Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Auth.net SIM currency other than default receives "Not allowed" error

Auth.net SIM currency other than default receives "Not allowed" error

Views: 1,780

Results 1 to 5 of 5
16 Dec 2015, 11:17 PM
#1
rixstix avatar

rixstix

Totally Zenned

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

Auth.net SIM currency other than default receives "Not allowed" error

zc 1.5.4
php 5.5.30
mySQL 5.6.27
ZC auth.net SIM module

Auth.net SIM returns an error message when a currency (CAD, AUD, GBP or Euro) other than default is being used within zencart.

For some reason, I understood that zencart transmitted default currency to auth.net regardless of chosen currency.
Has something changed? I don't recall customers having problems with currency issues in the past when choosing to pay via credit card, though most International customers use the default.

The only debug file is what was transmitted TO Auth.net. Nothing is being transmitted back from Auth.net. The error is being presented in the Auth.net payment screen.

Attachment 15869

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

16 Dec 2015, 11:32 PM
#2
rixstix avatar

rixstix

Totally Zenned

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

Re: Auth.net SIM currency other than default receives "Not allowed" error

Just finished with Auth.net support and they say the transaction must come from zencart in the default currency of my merchant account which is USD.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

17 Dec 2015, 2:46 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM currency other than default receives "Not allowed" error

Around line 385 in your SIM module code, you'll see a line like this:

    if (!in_array($order->info['currency'], array('USD', 'CAD', 'GBP', 'EUR', 'AUD', 'NZD', $this->gateway_currency))) {

I believe changing it to look like this should solve your problem:

    if (!in_array($order->info['currency'], array('USD', $this->gateway_currency))) {

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Dec 2015, 3:47 AM
#4
rixstix avatar

rixstix

Totally Zenned

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

Re: Auth.net SIM currency other than default receives "Not allowed" error

Thank you DrByte,

Tested with currency = CAD within zc. Currency appeared as USD in Auth.net. Processed by auth.net in USD. ZC order is in CAD.
That might be confusing to customers whose order appears in a currency other than default, but at least the transaction is processed without error.

Have coffee & donuts on me :smile:

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

31 Dec 2015, 3:08 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM currency other than default receives "Not allowed" error

I believe I have a much more reliable fix ... which I've posted here: https://github.com/zencart/zencart/pull/720 ... and will be rolled into v1.5.5.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.