Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Array?" passed to Authorize.net as country


jayf

Recommended Posts

We're SO close it seems to being finished with installing and configuring OSC and going live! But, we're running into an issue that I haven't had any luck searching the forums for.

 

In the customer's shipping information that is being passed to Authorize.net, their country is being passed as "Array" and not an actual country. So Authorize.net is declining the charges. Can anyone think of why this may happen?

 

We're using OSC 2.2MS2, with Bao Nguyens and Austin Renfroes additions to the Authorize.net module. Authorize says everything is great except for this one issue.

Link to comment
Share on other sites

I'm wondering if my moving the zipcode field to just after the state field has anything to do with this. I've also applied the fix to MS2.2 to show the state dropdown box in create_account.php . Maybe one of these two things is contributing to this?

 

Any help at all would be greatly appreciated. We're really dead in the water here and are getting billed for merchant account fees as we speak!

 

Also- the other weird thing is that the country (US) shows up in all of the order reports correctly. The only area where we see the word 'array' being passed off as the country is when it gets to Authorize.net as the shipping address.

Link to comment
Share on other sites

Here's what's being passed to Authorize.net. This is all test data, so obviously all #'s and names are fictitious. Note the problem in the shipping address:

 

Settlement Information

Settlement Amount: USD 3.81

Settlement Date and Time: --

Authorization Information

Authorization Amount: USD 3.81

Submit Date /Time: --

Authorization Code: 000000

Reference Transaction ID: Not Applicable

Transaction Type: Authorization Only

Address Verification Status: AVS Not Applicable (P)

Card Code Status: Not Processed

CAVV Result Code: Not Applicable

Fraud Score Applied: Not Applicable

Recurring Billing Transaction: N

Partial Capture Status: Not Applicable

Payment Information

Card Type: Discover

Card Number: XXXX0012

Expiration Date: XXXX

Total Amount: USD 3.81

Order Information

Invoice #:

Description: Your Products Description

Customer Billing Information

Name: Frederick Smith

Company:

Address: 122 Front Street

City: Anytown

State/Province: Massachusetts

Zip Code: 01056

Country: United States

Phone: 413-555-1212

Fax:

Email: [email protected]

 

Customer ID: 23

Customer Type:

Customer TaxID/SSN:

 

DL Number:

DL State:

DL DOB:

 

Shipping Information

Name: Frederick Smith

Company:

Address: 122 Front Street

City: Anytown

State/Province: Massachusetts

Zip Code: 01056

Country: Array

Phone: 413-555-1212

Additional Details - Level 2 Data

Tax: 0

Freight: 0

Duty: 0

Tax Exempt: N

PO Number:

 

If I can figure out where that darned 'array' in the Country field is coming from and fix it, they say it will work.

Link to comment
Share on other sites

  • 2 weeks later...

Johnson asked me to post the fix to the forum, so here is what took care of it for me:

 

In catalog/includes/modules , find the authorizenet_direct.php file.

 

Look for this text:

 

x_Cust_ID => "$customer_id",

x_First_Name => "{$order->customer['firstname']}",

x_Last_Name => "{$order->customer['lastname']}",

x_Address => "{$order->billing['street_address']}",

x_City => "{$order->billing['city']}",

x_State => "{$order->billing['state']}",

x_Zip => "{$order->billing['postcode']}",

x_Country => "{$order->billing['country']['title']}",

x_Phone => "{$order->customer['telephone']}",

x_Email => "{$order->customer['email_address']}",

x_Ship_To_First_Name => "{$order->delivery['firstname']}",

x_Ship_To_Last_Name => "{$order->delivery['lastname']}",

x_Ship_To_Address => "{$order->delivery['street_address']}",

x_Ship_To_City => "{$order->delivery['city']}",

x_Ship_To_State => "{$order->delivery['state']}",

x_Ship_To_Zip => "{$order->delivery['postcode']}",

x_Ship_To_Country => "{$order->delivery['country']}",

 

Find it? Ok- the problem is in the x_Ship_To_Country line. Change:

 

x_Ship_To_Country => "{$order->delivery['country']}",

 

to

 

x_Ship_To_Country => "{$order->delivery['country']['title']}",

 

That should cure the problem!

Link to comment
Share on other sites

Also, for anyone using Wells Fargo Secure Source's (and authorize.net) address verification service, you might have a problem with charges being denied when a customer of yours enters a different shipping address than their billing address. I believe they require the shipping info to be the same address as the billing address for fraud purposes.

 

If that happens, I suspect you can jury-rig the information that you pass to WF/Authorize.net by passing the billing info twice (instead of billing and shipping info). Take the code in the above post, and change 'delivery' in all of the x_ship_to lines to 'billing'. That should pass the billing info twice to WF/Authorize.net and eliminate the problem.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...