Page 1 of 1

R10/R11 Confusing Authorize.Net error during checkout

Posted: Tue Mar 01, 2016 4:30 am
by AbleMods
I've got a couple of clients reporting a confusing error during checkout with Authorize.Net.

The message comes back
There was a problem processing your payment: Successful
I remember running into this years ago, but can't put my finger on anything specific. My only recollection is it had something to do with the card details being valid, but fraud detection in ANet was causing the transaction to fail perhaps?? I have no memory at all of a solution.

Any thoughts or suggestions ?

Re: R10/R11 Confusing Authorize.Net error during checkout

Posted: Tue Mar 01, 2016 4:55 am
by Katie
This has come up before and to be honest, I really don't know why. Please read this post and let me know what you think -

viewtopic.php?f=65&t=18539&start=0&hili ... Successful

Thanks,
Katie

Re: R10/R11 Confusing Authorize.Net error during checkout

Posted: Wed Mar 09, 2016 11:49 am
by AbleMods
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

Re: R10/R11 Confusing Authorize.Net error during checkout

Posted: Wed Mar 09, 2016 1:24 pm
by Katie
Thanks again Joe. I'll get it reported.

Ref. Issue AC8-3060 - will be fixed in next release