spree_gateway icon indicating copy to clipboard operation
spree_gateway copied to clipboard

Authorize.net CIM does not update addresses if changed

Open onedanshow opened this issue 11 years ago • 2 comments

The adapter in spree_gateway does not update the billing or shipping addresses in Authorize.net if they are changed. Here's the scenario:

  • Customer is on default Spree checkout pages
  • For billing, customer puts in wrong billing address by accident
  • Spree create a customer payment profile on Authorize.net using current bill address ( Spree::Payment#create_payment_profile ) once customer fills out payment page
  • Customer clicks "Place Order" button
  • Spree::Payment::Processing#gateway_options summarizes the bill and ship address, however it appears spree_gateway does not use them: https://github.com/spree/spree_gateway/blob/master/app/models/spree/gateway/authorize_net_cim.rb#L36
  • AVS filter in Auth.net kicks back saying bill address and credit card are mismatched
  • Customer goes back to address page and changes it
  • Hit "Place Order" again and gets the same error because Auth.net CIM does not know about the updated billing address

This is related to #174

onedanshow avatar Sep 09 '14 20:09 onedanshow

@onedanshow - can you state what version of Spree or Spree gateway you documented this under?

In our store, we are aware of the issue, and for this reason we never allow a customer to 'edit' a previously entered credit card. All they can do is delete it (which triggers the remove call on the CIM).

You must remove the CC from the CIM when the user deletes it, or else you will get "A duplicate customer payment profile exists"

jasonfb avatar Mar 12 '15 14:03 jasonfb

I believe I verified this on 2.4

JDutil avatar Mar 12 '15 16:03 JDutil