I have a problem in the Payment Gateway in Magento 2, when I capture the data of the credit card I see the error that comes in the picture, I would like to know if you could help me. I'm working with the Braintree sandbox information. Thank you very much.
-
Check your logs. What are they saying?– vitoriodachefApr 6, 2018 at 19:49
-
It also depends on the amount of the order in sandbox mode as per the Braintree documentation, developers.braintreepayments.com/reference/general/testing/php– Bharat WebcluesJul 17, 2019 at 5:48
2 Answers
From your screenshot the error is pretty clear that the card was declined most likely to either one of the fields being incorrect or invalid amount I'd recommend you look at thier dev docs which you can find here
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
I took a look at what details I can see about the transaction and it looks like you're not using a Braintree card that would be declined on the verification, nor are you using an amount which would trigger a processor decline in the sandbox environment. As Dava mentioned below, it's most likely that some other field element is being passed that's invalid and is causing an error, quite possibly one we can't see from this screenshot. One common error we (and the Magento 2 community at large) have seen that can cause this are the Dynamic Descriptor values input in your Magento 2 admin section. See the related github issue here for a bit more information about how this can manifest. Braintree validation errors like these should be logged in your Magento's debug logs. You can enable these by doing the following:
Navigate to: Stores > Configuration > Sales > Payment Methods -> Configure (Under Braintree) > Advanced Braintree Settings > Debug
Set "Debug" To: "Yes"
I'd also recommend checking out Magento's github/issues section in general for other issues if you haven't already!