cancel
Showing results for 
Search instead for 
Did you mean: 

Authorize.net order in pending status but accepted on authorize.net, this only happens sometimes.

Authorize.net order in pending status but accepted on authorize.net, this only happens sometimes.

Magento version 2.2.3

 

We have many successful orders on our site using Authorize.net, but once in a while an order is put in pending status even though authorize.net accepted the order. I found an error on the exception log that MAY be the culprit:

 

main.CRITICAL: The transaction was declined because the response hash validation failed. {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): The transaction was declined because the response hash validation failed. at .../vendor/magento/module-authorizenet/Model/Directpost.php:606)"} []

 

I put in a case at authorize.net and they said:

"This can happen based on the data included in the transaction request, such as if any characters which are not supported, this may change the values we use to generate the hash vs the data they have on their end. This website has details on that: https://support.authorize.net/s/article/Changes-to-Supported-Characters ."

 

Does anybody know how to fix this error?

 

By the way, I have already loaded the patch for MD5, and most orders go through without a problem.

 

2 REPLIES 2

Re: Authorize.net order in pending status but accepted on authorize.net, this only happens sometimes

Hi @aaleavitt 

 

The problem was that payment/authorizenet_directpost/trans_md5 configuration was NULL.

To fix this set an MD5-Hash in the Authorize.net merchant admin under 

Settings > Security Settings > General Security Settings > MD5-Hash.

 

Then enter that same value in the Magento Admin under

 Stores > Configuration > Sales > Payment Methods > Authorize.net Direct Post > Merchant MD5

 

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Authorize.net order in pending status but accepted on authorize.net, this only happens sometimes

That setting no longer exists in authorize.net. As far as I know they discontinued use of the MD5 and only use SHA-512. I already loaded a patch that solved this problem;

 

https://support.magento.com/hc/en-us/articles/360024368392-Update-Authorize-Net-Direct-Post-from-MD5...

 

but I still get the error every once in a while. Most of the time the orders don't have a problem, but sometimes an order is placed several times because the customer thinks the order was not processed. After placing an order sometimes it just returns to the checkout page and looks as if it was not processed but in reality it was accepted in authorize.net but the return data is not going through in magento.