Post by erik_bw » Tue Jun 07, 2011 1:37 am

Hi,
I'm having an issue with using a store based in the UK with a US Authorize.net account.

The UK store is set to GBP as default currency. Authorize.net only accepts USD so I can set this in the order information that is sent to Authorize.net, but it will process everything using the same order total shown in GBP. So if someone buys something for 99 pounds it will send USD$99 to Authorize.net for processing.

A bad alternative is to have USD as default and then have users select GBP when the use the store, but since this is a UK only online store this is a far from ideal alternative

I have been looking at authorizenet_aim.php and see where the currency is set as well as where it is set at value 1.0000. I am hoping that someone knows a way to dynamically alter this in the info that is sent to authorize.net the same way it is dynamically altered on the store itself.

Thanks

Newbie

Posts

Joined
Tue Jun 07, 2011 1:31 am

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by erik_bw » Tue Jun 07, 2011 2:19 am

Thank You Qphoria!

#2 worked perfectly.

I had already tried #1, but that was sending 1 for 1, in other words 1 pound was being sent and processed as 1 dollar. But the second solution worked perfectly (after removing solution#1).

Thanks again.

Newbie

Posts

Joined
Tue Jun 07, 2011 1:31 am

Post by bafaraj » Tue Jun 07, 2011 3:10 am

can we apply the same for 2CO Payment Module ?

متجر إنـشــاد | نختصر المسافات
http://www.inshadstore.com


New member

Posts

Joined
Fri Nov 12, 2010 12:32 am
Location - UAE

Post by Qphoria » Tue Jun 07, 2011 3:15 am

You can apply to any payment module

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by andyinjapan » Sat Jul 14, 2012 10:52 am

Can someone help out with doing the same with a current version of OpenCart?

I need to run the store in Canadian dollars, but I get the "The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate." error.

Image

In OpenCart v1.5.3.1, the relevant lines in catalog/controller/payment/authorizenet_aim.php are:

Code: Select all

$data['x_amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], 1.00000, false);
$data['x_currency_code'] = $this->currency->getCode();
Looking at the post above, I'm not sure what changes have to be made here. Default currency on the site is CAD, by the way.

Any help would be appreciated.



By the way, in OpenCart v1.5.3.1, the lines in catalog/controller/payment/sagepay.php are:

Code: Select all

$data['Amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
$data['Currency'] = $order_info['currency_code'];

Newbie

Posts

Joined
Mon Jun 25, 2012 8:20 am

Post by Qphoria » Sat Jul 21, 2012 9:42 pm

1. EDIT: catalog/controller/payment/authorizenet_aim.php

2. FIND TWICE:

Code: Select all

$order_info['currency_code'], 1.00000,
3. REPLACE BOTH WITH:

Code: Select all

'USD', false,

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by baldwinpines » Mon Dec 07, 2015 12:16 pm

(Sorry...just realized I'd posted in 1.5 support when I need help with 2.0.3.1)

Newbie

Posts

Joined
Tue Oct 27, 2015 12:13 am
Who is online

Users browsing this forum: No registered users and 9 guests