ok, I figured it out.
Steps to Reproduce in Gold R11:
First, the store has to be configured to not allow checkout if payment did not succeed.
Configure your gateway for your Sandbox credentials
Set the gateway to Test Gateway, Live Mode
Now place an order and enter this on the payment page:
Card Type: Visa
Card #: 4111 1111 1111 1111
Expires: 01/2017
CVV: 901 (this forces test gateway to respond with invalid CVV error)
Submit the payment. You'll get the message back:
"There was a problem processing your payment: Successful"
In the Authorize.Net CIM gateway AuthNetCIMProvider.cs at Line 1718, you are pulling the response message of the transaction from response.messages.message. The problem is, that will only ever be "Successful" because it refers to the status of the communication of the transaction, not the success or failure of the transaction itself.
The code needs to check response.transactionResponse.errors. If there are any errors, the actual error message will be in there.
So change this:
Code: Select all
List<messagesTypeMessage> messages = response.messages.message;
if (messages.Count > 0)
{
responseCode = messages[0].code;
responseMessage = messages[0].text;
}
to this:
Code: Select all
// BEGIN MOD: AbleMods.com
// DATE: 03/09/2016
// BUG FIX: Should be using errors collection not messages
List<transactionResponseError> errors = response.transactionResponse.errors;
if (errors.Count > 0)
{
responseCode = errors[0].errorCode;
responseMessage = errors[0].errorText;
}
else
{
List<messagesTypeMessage> messages = response.messages.message;
if (messages.Count > 0)
{
responseCode = messages[0].code;
responseMessage = messages[0].text;
}
}
// END MOD: AbleMods.com