0

I've set up authorize.net direct post in test mode on my live server.

Trying to make a purchase I get an error. In the exception log I get :

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 /var/www/html/vendor/magento/module-authorizenet/Model/Directpost.php:539)"} []

Does anyone know why this is occurring?

Any help would be appreciated.

Thanks.

5
  • Please check this configuration in Magento and Authorize.net magento.stackexchange.com/a/4314/39238 Commented Jan 2, 2020 at 8:58
  • @NalinSavaliya i am using magento2.2.3 Commented Jan 2, 2020 at 9:02
  • Yes, I know. But it's same thing for Magento 2 configuration, just path is different Commented Jan 2, 2020 at 9:22
  • Please find below answer Commented Jan 2, 2020 at 9:42
  • Have you apply patch? Commented Jan 3, 2020 at 9:39

3 Answers 3

0

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.

1
0

Authorize.net will stop supporting MD5 based hash usage on June 28, 2019. This will result in Magento merchants not being able to process payments using Authorize.Net Direct Post. To avoid this, merchants need to apply the patch provided by Magento and replace the existing MD5 hash with a Signature Key (SHA-512) in the Magento Admin configuration settings.

You can find more details at https://support.magento.com/hc/en-us/articles/360024368392-Update-Authorize-Net-Direct-Post-from-MD5-to-SHA-512

0

1º Method

You can upgrade to version 2.2.8 or 2.3.1

2º Method

You can apply this patch from Magento below. Don't copy the space in that your Authorize.net panel will show.

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

Magento 2 Authorize.net MD5 Hash

Other solutions

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.