Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Authorize.net wrong currency error 99

Authorize.net wrong currency error 99

Views: 920

Results 1 to 3 of 3
21 Sep 2014, 2:58 PM
#1
lukaswlu avatar

lukaswlu

New Zenner

Join Date:
Mar 2014
Location:
Canada
Posts:
31
Plugin Contributions:
0

Authorize.net wrong currency error 99

Few weeks ago I have changed something in my setting as paypal was getting the wrong currency. My store is in CDN and paypal was charging customers USD dollars. I chagned someething and Paypal now works properly but Authorize.net stopped working. I am pretty sure it is because it is sending the wrong currency.

[x_invoice_num] =>
[x_duplicate_window] => 120
[x_allow_partial_Auth] => FALSE
[x_description] => Website Purchase from U-Brew Supply
[x_currency_code] => USD
[x_fp_sequence] => 55
[x_fp_timestamp] => 1411063543
[x_fp_hash] => 2d2519f997c4765a88e8c7344c75a2d8
[x_show_form] => PAYMENT_FORM
[x_receipt_link_method] => POST
[x_receipt_link_text] => Click here to complete your order.

the [x_currency_code] => USD

need to say CDN i guess for cdn dollars.

I am getting error 99, I issued a new key and hashtag. and talked to rep from authorize.net who informed me that my account can only accept CDN.

21 Sep 2014, 3:21 PM
#2
lukaswlu avatar

lukaswlu

New Zenner

Join Date:
Mar 2014
Location:
Canada
Posts:
31
Plugin Contributions:
0

Re: Authorize.net wrong currency error 99

ok I have changed few lines in my authorizenet.php and it seems to work, but I am affraid it will mess other things up, and how did it get changed this way by itself. Something is not right here.
I changed all the instances of USD to CAD in code bellow. lines 350 or so.

// force conversion to USD
if ($_SESSION['currency'] != 'CAD') {
  global $currencies;
  $submit_data_core['x_amount'] = number_format($order->info['total'] * $currencies->get_value('CAD'), 2);
  $submit_data_core['x_currency_code'] = 'CAD';
  unset($submit_data_core['x_tax'], $submit_data_core['x_freight']);
}