Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Auth.net SIM order address changes not updated in zc order

Auth.net SIM order address changes not updated in zc order

Views: 479

Results 1 to 5 of 5
3 Oct 2017, 2:59 PM
#1
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Auth.net SIM order address changes not updated in zc order

It has taken a bit to figure out why a customer's billing and/or address changes during checkout are not changed on the order.

Is this a auth.net SIM issue or a OPC issue?

I know auth.net SIM is dated and it has been a while since we used auth.net AIM so I don't know if this also applies to AIM but when/if a customer edits their billing and/or shipping address on the SIM payment screen, those edits are now reflected in the order as saved in the zencart database which then results in orders being shipped to the wrong address.

In this case the customer was very certain that the address was edited during the checkout process and I could not duplicate the issue within the zencart checkout process (currently using OPC). Today, I realized that the billing and shipping addresses could be edited on the auth.net SIM payment information page. My test order proved that either auth.net SIM is not transmitting that information back to zencart or zencart is ignoring that information.

I haven't a clue where to look and if I did, I wouldn't have a clue how to fix it or figure out a work-around.

If the work-around or fix is to switch back to auth.net AIM, then I have a more significant PCI issue.

Thanks

3 Oct 2017, 5:07 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Auth.net SIM order address changes not updated in zc order

The built-in SIM module "sends" the customer address details to the offsite payment page, but doesn't process any changed address information upon return.

If you want to do that for yourself, you can customize the code:

    if ($this->authorize['x_response_code'] == '1'
//       && $this->authorize['x_type'] == $this->submit_data['x_type']
//       && $this->authorize['x_method'] == $this->submit_data['x_method']
//       && $this->authorize['x_amount'] == $this->submit_data['x_amount']
//       && $this->authorize['x_invoice_num'] == $this->submit_data['x_invoice_num']
//       && $this->authorize['x_description'] == $this->submit_data['x_description']
       && (/*MODULE_PAYMENT_AUTHORIZENET_MD5HASH == 'DANGEROUSLY-BYPASSED' || */ $this->authorize['x_MD5_Hash'] == $this->authorize['HashValidationValue'])
     ){
      $order->info['cc_type'] = $this->authorize['x_card_type'];
      $order->info['cc_number'] = $this->authorize['x_account_number'];
      $order->info['cc_owner'] = $this->authorize['x_first_name'] . ' ' . $this->authorize['x_last_name'];
      $this->auth_code = $this->authorize['x_auth_code'];
      $this->transaction_id = $this->authorize['x_trans_id'];

[B]/// add your logic to validate, sanitize, and override address information here. Consider also that you should probably also insert extra address-book records for the customer too. 
[/B]

      return;
    }

See approx page 70 at https://www.authorize.net/content/dam/authorize/documents/SIM_guide.pdf

However, a 5-minute fix to both PCI and all this address stuff is to just switch to Square for checkout. :)

3 Oct 2017, 5:08 PM
#3
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM order address changes not updated in zc order

Thanks DrByte. We were typing at the same time

Update after looking at auth.net SIM debug file. Probably should post in the OPC support thread but didn't want to duplicate this thread.

After looking at the auth.net SIM debug log of date returned to zencart by auth.net, the address info returned by auth.net is not being used to update the order information before actually creating the zencart order number. ie: billing and/or shipping information updates.

OPC v1.1.0 (so that's a bit behind the time)

3 Oct 2017, 6:12 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Auth.net SIM order address changes not updated in zc order

Ya, it's not an OPC issue.

The SIM module for ZC was never built to receive changed address details.
The AIM module controls all address data within ZC.

3 Oct 2017, 6:57 PM
#5
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM order address changes not updated in zc order

I thought that could be the case. It just took several weeks to finally figure out why we had a grumpy customer who swore the address info was changed during checkout but customer didn't look at the final order confirmation, then customer realized the package went to the wrong address when the shipping confirmation was received.

I didn't think to step all the way through until today. The customer did have the right to be grumpy.

I may have to switch back to AIM to avoid future instances but not sure I want to (or if I am capable of ) tackle SAQ-D