Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Built-in Shipping and Payment Modules / Authorize.net : The supplied currency code is either invalid

Authorize.net : The supplied currency code is either invalid

Locked

Started by dharma on 6 Feb 2008, 5:54 PM · Views: 12,898

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
6 Feb 2008, 5:54 PM
#1
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Authorize.net : The supplied currency code is either invalid

My ZC is not translating currencies into USD before transmission to Authorize.net.

Is there a setting I missed? or will this work when I go live?

I have authorize.net (AIM) set to production, and authorize.net's gateway set to test mode.

I have the default currency in USD, no other languages, running ZC 1.3.8a

ex: $6 product:

USD (accepted):

Response Code: 1.
Response Text: (TESTMODE) This transaction has been approved.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_CAPTURE
[x_method] => CC
[x_amount] => 6.00
[x_currency_code] => USD

GBP:

Response Code: 3.
Response Text: (TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_CAPTURE
[x_method] => CC
[x_amount] => 6.00
[x_currency_code] => GBP

EURO:

Response Code: 3.
Response Text: (TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_CAPTURE
[x_method] => CC
[x_amount] => 6.00
[x_currency_code] => EUR

From Merchant support at Authorize.net:

3|1|39|*(TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate: Error 39 only brings up that text, we have no work around documents for that error. Apparently it does not appear that the correct currency code is being submitted to Authorize.Net. You will most likely want to either remove the currency code variable, or review our implementation guide at [ http://developer.authorize.net/guides/ ] to be sure that the cart is correctly integrated with Authorize.Net.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

7 Feb 2008, 1:19 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Authorize.net : The supplied currency code is either invalid

Authorize.net only supports USD.

.
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.

7 Feb 2008, 1:23 AM
#3
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

I was under the impression that ZC translated other currenices into USD before transmission:

Authorize.net only processes in USD at the present time.
Their parent company, CyberSource allows processing in alternate currencies.
You might want to talk to your Authorize.net representative for alternate options.

The x_currency_code field is currently not used, according to the technical integration staff I just spoke to.

Zen Cart is translating the purchase amount to USD before submission, based on your currency exchange rates set in your admin area.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Feb 2008, 10:02 PM
#4
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

I ran some more tests and still have the same results as above.

Does ZC translate currencies before transmission? I read some previous posts that led me to that conculsion.

And if so, with USD as my default currency, could that amount be sent in USD to Authorize.net ?

sorry if I missed something here...

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

8 Feb 2008, 10:13 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Authorize.net : The supplied currency code is either invalid

Yes, it's supposed to convert to USD before submitting for processing.

.
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.

8 Feb 2008, 10:21 PM
#6
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

Yay! however, why isn't it doing that with my authorize.net?

I did a uninstall/re-install of Authoroize.net for 1.3.8a recently and have updated by currencies in the admin.

Did I miss a setting somewhere?

It seems to work ok with PPE when I select send to paypal as USD...

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

9 Feb 2008, 12:02 AM
#7
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

I tried an un-install/re-install of authorize.net (Aim) to hopefully get this working.

I still get the above error, however ZC is now translating the currencies into USD, but getting hung up on the currency code:

same $100 item:

cart amount: 53 GBP

Response Code: 3.
Response Text: (TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_ONLY
[x_method] => CC
[x_amount] => 100.00
[x_currency_code] => GBP

cart amount: €70.88

Response Code: 3.
Response Text: (TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_ONLY
[x_method] => CC
[x_amount] => 100.00
[x_currency_code] => EUR

cart amount: Amount $100 USD:

Response Code: 1.
Response Text: (TESTMODE) This transaction has been approved.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_ONLY
[x_method] => CC
[x_amount] => 100.00
[x_currency_code] => USD

Running ZC 1.3.8a with authorize.net gateway in TEST MODE

My ZC Settings:

Enable Authorize.net (AIM) Module
True

Login ID
XXXXXXXXXXXXX

Transaction Key
****************

MD5 Hash
***************

Transaction Mode
Production

Authorization Type
Authorize

Enable Database Storage
False

Customer Notifications
False

Merchant Notifications
True

Request CVV Number
True

Sort order of display.
10

Payment Zone
--none--

Set Completed Order Status
default

Set Refunded Order Status
Pending [1]

Debug Mode
Log and Email

Do I have a bug? or is there an incorrect setting staring in me in the face somewhere?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

9 Feb 2008, 12:05 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Authorize.net : The supplied currency code is either invalid

You might have a bug.
Try commenting out the line that references x_currency_code in the payment module, by adding **// **at the beginning of the line.

.
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.

9 Feb 2008, 12:37 AM
#9
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

line 333: already commented out on

includes/modules/payment/authorizenet.php

adding new comments to line 315 :

/includes/modules/payment/authorizenet_aim.php

and line 330:

/includes/modules/payment/authorizenet_echeck.php

cart amount: 53 GBP

Response Code: 1.
Response Text: (TESTMODE) This transaction has been approved.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_ONLY
[x_method] => CC
[x_amount] => 100.00
[x_card_num] => XXXXXXXXXXXXXXXXXXX1111

Yaaaaaaaaaaaaaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyy! :clap:

Thank you DrByte!
:cheers:

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

9 Feb 2008, 12:41 AM
#10
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

..............yaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyy!

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

14 Feb 2008, 5:00 AM
#11
bjornarl avatar

bjornarl

New Zenner

Join Date:
May 2006
Posts:
13
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

I had this exact same problem on a production 1.3.8a store for which I had removed and reinstalled the authorize.net AIM module as instructed after upgrading.

I wanted to mention it as it wasn't clear to me from this thread whether it was diagnosed as a limited situation-specific bug or a general 1.3.8a bug... I don't see it on the known bugs list (http://www.zen-cart.com/forum/showthread.php?t=82619) but perhaps it should be?....

14 Feb 2008, 5:15 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: Authorize.net : The supplied currency code is either invalid

Fair enough. Call it a bug.

.
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.

9 Mar 2008, 11:09 AM
#13
tanvir avatar

tanvir

New Zenner

Join Date:
Mar 2008
Posts:
2
Plugin Contributions:
0

Re: Authorize.net : The supplied currency code is either invalid

i also fetch the same problem... I can't provide the currency type from my site. the amount which user provide either it would be in doller or euro. then how i provide the currency type when i provide amount. my code is as follows

thank you

tanvir

///////////////////////////////////////
$authnet_values = array
(
"x_login" => $auth_net_login_id,
"x_version" => "3.1",
"x_delim_char" => "|",
"x_delim_data" => "TRUE",
"x_url" => "FALSE",
"x_type" => "AUTH_CAPTURE",
"x_method" => "CC",
"x_tran_key" => $auth_net_tran_key,
"x_relay_response" => "FALSE",
"x_card_num" => "***",
"x_exp_date" => "
",
"x_card_code" => "
",
"x_description" => "Recycled Toner Cartridges",
"x_amount" => "12.23",
"x_first_name" => "Charles D.",
"x_last_name" => "Gaulle",
"x_address" => "342 N. Main Street #150",
"x_city" => "Ft. Worth",
"x_state" => "TX",
"x_zip" => "12345",
"x_currency_code" => "USD",
"CustomerBirthMonth" => "Customer Birth Month: 12",
"CustomerBirthDay" => "Customer Birth Day: 1",
"CustomerBirthYear" => "Customer Birth Year: 1959",
"SpecialCode" => "Promotion: Spring Sale",
);
//////////////////////////////////////

dharma:

line 333: already commented out on

includes/modules/payment/authorizenet.php

adding new comments to line 315 :

/includes/modules/payment/authorizenet_aim.php

and line 330:

/includes/modules/payment/authorizenet_echeck.php

cart amount: 53 GBP

Response Code: 1.
Response Text: (TESTMODE) This transaction has been approved.

Sending to Authorizenet: Array
(
[x_login] => *******
[x_tran_key] => *******
[x_relay_response] => FALSE
[x_delim_data] => TRUE
[x_delim_char] => |
[x_encap_char] => *
[x_version] => 3.1
[x_type] => AUTH_ONLY
[x_method] => CC
[x_amount] => 100.00
[x_card_num] => XXXXXXXXXXXXXXXXXXX1111

> 
> 
> 
> Yaaaaaaaaaaaaaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyy! :clap:
> 
> Thank you DrByte!
> :cheers: