Placing an order using Authorize.Net Direct Post Sandbox account causes an error message:
"An error occurred on the server. Please try to place order again"
Cause 1: Testing Mode is enabled
It does not seem obvious, but the Authorize.net's Testing Mode setting must be set to No even when testing with the Sandbox account.
Solution 1: disable Testing Mode
- Go to Stores > Configuration > Sales > Payment Methods > Other Payment Methods > Authorize.net Direct Post.
- Set Test Mode to "No" (uncheck Use system value, then select "No" in the menu).
- Click Save Config.
Cause 2: Incorrect URL's
The Authorize.net settings might contain incorrect URL addresses for the critical Authorize.Net resources.
Solution 2: Provide correct URL's
- Gateway URL:
- Transaction Details URL:
- API Reference:
If nothing helped: get debug info
If placing an order with Authorize.net fails with a non-informative "Something went wrong" error, check the Magento
In case the
debug.log is empty, check the transact.dll response in your web browser's console:
- Open the console.
- Before placing an order, go to the Network tab and select Preserve log.
- Filter responses by transact.dll to see a response message with a possible error.