SDK/Library version: 4.4.0
Environment: Sandbox
Language, language version, and OS: Python 3.6 and 3.8 on Debian stretch and Ubuntu
Issue description
For an existing braintree customer with no payment methods, I try to make a transaction sale with a "payment_method_nonce" and the option "store_in_vault_on_success" is True. (https://developers.braintreepayments.com/reference/request/transaction/sale/python#options.store_in_vault_on_success)
If I use an amount that causes a processor decline in sandbox, I expect that the transaction will fail and the credit card will not get vaulted. The transaction fails as expected but the credit card gets vaulted.
This seems to be an issue with the Braintree API itself.
Here's an integration test that might help demonstrate the issue. Am adding it here since I could not run integration test locally.
General information
Issue description
For an existing braintree customer with no payment methods, I try to make a transaction sale with a "payment_method_nonce" and the option "store_in_vault_on_success" is True. (https://developers.braintreepayments.com/reference/request/transaction/sale/python#options.store_in_vault_on_success) If I use an amount that causes a processor decline in sandbox, I expect that the transaction will fail and the credit card will not get vaulted. The transaction fails as expected but the credit card gets vaulted. This seems to be an issue with the Braintree API itself.
Here's an integration test that might help demonstrate the issue. Am adding it here since I could not run integration test locally.