I am using Magento 2.1.3 EE and i applied patch using

patch -p1 < patchfile.patch which applied patch in 5 files of vendor/magento/module-authorizenet

I did follow the instruction given by the magento here in this article: https://support.magento.com/hc/en-us/articles/360024368392

Also, follow sandbox setup using following: https://support.magento.com/hc/en-us/articles/360000570793-Error-placing-order-with-Authorize-net-Sandbox-account-An-error-occurred-on-the-server-

I have added all details correctly and verified.

Issue is while testing the authorization.net in sandbox in my local giving this error:

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

whilst on staging it says :

Transaction has been declined because response hash validation has been failed in vendor/magento/module-authorizenet/Model/Directpost.php 557

What could be the issue? What's the fix for this? Debug mode is on but no clues in logs. How can i identify error and cause of this issue.

Any help would be appreciated.

  • Also getting errors. First their instructions sucked. None of the links they said to follow existed and the patch wouldn't work without editing. (DirectPost.php was offset by 12 lines) First error (testing on sandbox): "The transaction was declined because the response hash validation failed" I re-entered all of the login parameters and now I get: "Please enter a transaction ID to authorize this payment."
    – Scott
    Commented Mar 11, 2019 at 15:51
  • Hi, I got this error because i was doing early testing. Sandbox starting date was 7 march and i started testing on 6th. Next day it started working. Commented Mar 12, 2019 at 6:54
  • Does it work for live credit card payments? I wasn't able to get it working on my site. Thanks
    – Dajdon
    Commented Mar 14, 2019 at 5:24
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review Commented Mar 14, 2019 at 5:45

2 Answers 2


Hey you should be try this, looks like they have the patch for your version https://github.com/MeetanshiInc/Magento-Authorize-Net-Direct-Post-Patch-for-M1-M2

  • Thanks for your reply. I found the solution. Thanks Commented Mar 12, 2019 at 6:52
  • how can you pull that as a .patch?
    – Scott
    Commented Mar 15, 2019 at 20:30

I found solution of it. This was not working because authorize.net didn't enabled sandbox. Sandbox was starting from 7 march and i was checking it on March 6. It works perfectly.

As per this article

Thank you,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.