spree_gateway
                                
                                
                                
                                    spree_gateway copied to clipboard
                            
                            
                            
                        Authorize.net CIM does not update addresses if changed
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 - 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"
I believe I verified this on 2.4