Magento – Authorize.net : An error occurred on the server

authorize.netmagento-2.1

Magento authorize.net configuration has test mode and debug enabled. Gateway url: https://secure.authorize.net/gateway/transact.dll

When we try to place an order with test credit card number 4111111111111111 we get an alert message:

An error occurred on the server. Please try to place the order again.

Initially we got infinite loader and also in the network tab, the error Message:

Please enter a transaction ID to authorize this payment

and could see transact.dll as in the image enter image description here

But now only getting alert:

An error occurred on the server. Please try to place the order again

Tried to display the exact error message by modifying vendor/magento/module-checkout/Model/PaymentInformationManagement.php to output $e->getMessage() instead of the generic display message. But it's still displaying the generic message.

How to fix this issue such that the order is placed in processed mode and customer is redirected to success page?

Best Answer

app\code\Magento\Payment\view\frontend\templates\transparent\iframe.phtml

 globalMessageList.addErrorMessage({
                    message: '<?php echo $params['error_msg'];?> Please double-check your billing details or call ### immediate assistance.'
                });

Add above the line on line 42 and check which error showing.

Related Topic