Hi @tiberiuz3401
The behavior you were describing only happens in sandbox mode. That is how Braintree behaves in sandbox mode only. This would not be an issue in production.
Kind regards
I went to WooCommerce -> Payments -> API Settings and saw that “Active Environment” is “Production”.
I don’t know what hooks and functions are called in this process. For me it seems that pressing the “cancel transaction” button triggers the same action as if I accepted to pay. And the solution would be that button to trigger a hook for cancelling order.
Hi @tiberiuz3401
Were you using a real credit card or a test card?
If you were using a test card then for sure you had sandbox mode enabled.
Hi @tiberiuz3401,
I ran some tests in sandbox mode and when the 3DS validation is cancelled the following message appears:
There was an error processing your payment. Reason: Your payment method was rejected due to 3D Secure..
Can you confirm that when you click cancel, a transaction is being created in Braintree? That is not what happens in my test environment.
Kind Regards,
I tested with a real credit card.
At order notes it says “Order captured in Braintree: Transaction ID: *******. Payment method: MasterCard ending in ****” (the * are for hiding the true values).
Hi @tiberiuz3401
On the order details page for that order you can click the transaction ID and it will take you to your Braintree account and show you a view of the transaction. Does it say liability was shifted for the transaction?
There will be some metadata about 3DS.
Kind regards
Hi @tiberiuz3401,
I reviewed the code further and on the Credit Card Settings page when 3DS is enabled you can control how the plugin reacts when the user cancels the 3DS popup. In your case, you would want to set the Liability not shifted option to reject.
Kind Regards,
Hello, sorry for being absent.
I changed to option to reject, but it still finish the order and takes the amount from the credit card.
But I tried something interesting. When I have NO braintree-subscription-variation products in the order, canceling the transaction works: order fails and no amount is taken from my credit card. It seems that braintree-subscription-variation products interact somehow.
Hi @tiberiuz3401,
The information about the subscription is helpful. Do your subscriptions have an initial fee or a trial period? How do you have the subscriptions setup?
Kind Regards,
No initial fee nor trial period.
This is copied from that product.
Regular price (€)
10
Sale price (€) Schedule
Stock status
In stock
Weight (kg)
0.05
Dimensions (L×W×H) (cm)
0.1
0.1
0.1
Shipping class
Same as parent
Tax class
Same as parent
Description
Environment Production
One Time Shipping
Subscription Price (€) 8
Billing Interval every month
Length never expires
Sign Up Fee 0
Trial Length 0
Trial Period day
Production Plans 30-subscription (EUR)
Hi @tiberiuz3401,
Thanks for that info. I’ll replicate this subscription product in my development environment and give it a test.
I’ll let you know what I find.
Kind regards
Hi @tiberiuz3401
Version 3.2.23 now applies the 3DS custom validation to Braintree Subscriptions.
Kind regards
Hello,
Do you know what steps I must take to implement the custom validation for Braintree Subscriptions?
Thanks
Hi @tiberiuz3401
On the bottom of the Credit Card Gateway Settings page when you enable 3DS you will see drop downs where you can trigger actions based on if the card is ineligible etc.
You can set the action to reject.
Kind regards