Checkout failures due to AVS cannot be resolved

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

Checkout failures due to AVS cannot be resolved

Post by AbleMods » Wed Jul 26, 2017 2:40 am

A client pointed something out to me today I never noticed before:

When you have the store configured to accept the order even if the payment fails, the shopper gets sent to the PayMyOrder page because the order still has a balance.

The problem is when the payment failed due to AVS Mismatch (wrong zip code, bad street number etc). The shopper needs to edit the billing address before re-attempting the payment authorization. PayMyOrder gives the shopper a link to edit the address, but that only updates the address book.

The payment gateway always pulls the billing address info from the order, not the address book. So effectively it's impossible for a shopper to resolve an AVS failure post-checkout.

Any suggestions on a code change that would make PayMyOrder update the order bill-to after it updates the address book?
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
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Checkout failures due to AVS cannot be resolved

Post by AbleMods » Thu Aug 03, 2017 2:27 am

Any thoughts on this one?
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

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Checkout failures due to AVS cannot be resolved

Post by jguengerich » Thu Aug 03, 2017 3:55 am

I haven't tested this, but I think you would have to change Members/EditMyAddress.aspx.cs. It looks like the PayMyOrder page passes the order number to EditMyAddress so it knows to send the user back to the PayMyOrder page. This is done in the ShowAddressBook function of the EditMyAddress page.

So, in the EditSaveButton_Click function, you would need to get the order number (copied from ShowAddressBook code):

Code: Select all

string orderNumber = Request.QueryString["OrderNumber"];
Then add code to get the order and change the address fields in the order to match the address object that was just saved. Looks like you could do it right before ShowAddressBook is called, but you want to make sure it works properly with the address validation workflow too.

EDIT: Note by doing this you'll lose the original address that was used for the order, if that matters. Also, you may also want/need to have code to make sure it is the billing address they are changing before modifying the order.
Jay

Post Reply