cancel
Showing results for 
Search instead for 
Did you mean: 

Braintree integration does not work in Magento 2.2.0?

SOLVED

Braintree integration does not work in Magento 2.2.0?

So, it was a little irritating and disheartening to find out that the Braintree payment integration does not work in Magento 2.2.0.  I got everything setup, inventory added, layout configured, etc to find out during the last step of the setup of the store that you can't purchase anything because the Braintree integration does not work properly.

Upon checkout, when submitting the credit card, I get:

 

X     Transaction has been declined.  Please try again.

 

I contacted Braintree and the guy was nice enough to look through their logs and tell me that there was incorrect information being sent to them from my site.  He said that the reason that it may be getting rejected is because the phone number for my dynamic descriptor was not matching the requirements.  He stated that he really can't help me much because the code that was used in Magento was written by the Magento community.  So, everything I have looked at in my setup has the correct information for my dynamic descriptors.  I have put in a 10 digit phone number and for some reason, it is only passing the first four digits to Braintree.  This is based off of the log that he sent me:

 

[VALIDATION ERRORS] 92201 (Company name/DBA section must be either 3, 7 or 12 characters and the product descriptor can be up to 18, 14, or 9 characters respectively (with an * in between for a total descriptor name of 22 characters).) 
"Parameters: {\"transaction\"=>{\"type\"=>\"sale\", \"customer\"=>{\"first_name\"=>\"Test\", \"last_name\"=>\"User\", \"company\"=>nil, \"phone\"=>\"5405555555\", \"email\"=>\"someone@somewhere.com\"}, \"amount\"=>\"23.17\", \"payment_method_nonce\"=>\"de46fa18-1250-093c-7fcc-b4315f091fa0\", \"order_id\"=>\"000000015\", \"channel\"=>\"Magento2_Cart_Community_BT\", \"billing\"=>{\"first_name\"=>\"Test\", \"last_name\"=>\"User\", \"company\"=>nil, \"street_address\"=>\"123 Sesame St\", \"extended_address\"=>nil, \"locality\"=>\"Alexandria\", \"region\"=>\"VA\", \"postal_code\"=>\"22241\", \"country_code_alpha2\"=>\"US\"}, \"shipping\"=>{\"first_name\"=>\"Test\", \"last_name\"=>\"User\", \"company\"=>nil, \"street_address\"=>\"123 Sesame St\", \"extended_address\"=>nil, \"locality\"=>\"Alexandria\", \"region\"=>\"VA\", \"postal_code\"=>\"22241\", \"country_code_alpha2\"=>\"US\"}, \"options\"=>{\"store_in_vault_on_success\"=>true}, \"descriptor\"=>{\"name\"=>\"PAPARAZZITGS\", \"phone\"=>\"5403"

 

I would send the debug.log from my Magento but, that doesn't do anything.  I have debug turned on in the Braintree module settings and nothing gets written to the debug.log.  The only thing that does get written is to the system.log and that is:

 

[2017-10-29 12:57:04] main.CRITICAL: Braintree error response. [] []
[2017-10-29 12:57:04] main.CRITICAL: Wrong transaction status [] []

 

These aren't very helpful logs.  I have already spent way too much effort attempting to figure out other things (backend code, etc) that I just don't have the time nor energy to dig into this myself.  Has anyone seen this issue and figured out a solution?  I have read hundreds of issues from past version about this exact same thing and all of the bugs were closed as "can't reproduce".  This seems a little bogus since there are tons of people that have the same issue and they keep closing them as "can't reproduce".

I really don't want to go to a different solution but, at this point, it seems there may be no other option.  This may make me kill the magento project that I was working on.

 

Thanks,

 

Jay

 

2 REPLIES

Re: Braintree integration does not work in Magento 2.2.0?

So, as usual, I figured it out as soon as I posted.  I wish I would have posted MUCH earlier!  Smiley Happy

 

The solution is to remove the dynamic descriptors from the Braintree setup within Magento 2.2.  I guess the descriptors are not being pushed to Braintree correctly.

 

Jay

Re: Braintree integration does not work in Magento 2.2.0?

Thank you Jay! With more testing I was able to pass the values by being very careful to follow the formatting notes displayed below each field in the Magento sales/payment Braintree window.  Appreciate your help!