R10/R11 Confusing Authorize.Net error during checkout

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

R10/R11 Confusing Authorize.Net error during checkout

Post by AbleMods » Tue Mar 01, 2016 4:30 am

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 ?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

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

Post by Katie » Tue Mar 01, 2016 4:55 am

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
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

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

Post by AbleMods » Wed Mar 09, 2016 11:49 am

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
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

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

Post by Katie » Wed Mar 09, 2016 1:24 pm

Thanks again Joe. I'll get it reported.

Ref. Issue AC8-3060 - will be fixed in next release
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply