I currently use Authorize.net to handle my USD $ payments on my Opencart site. I'm trying to add the ability for customers to checkout with Euros and Pound Sterlings too. Thanks to the help of users here I was able to arrive at the conclusion that I need to setup additional Authorize.net payment gateways for each additional foreign currency I use on my site (in this case, for Euros and Pound Sterlings).
My question is this; how do I setup multiple Authorize.net payment gateways in Opencart? I'm running v1.5.1 currently.
You would need to copy all the Authorize.NET
files into new payment modules (called e.g. authorizenet_eur_aim and authorizenet_gbp_aim with maybe renaming the default one into authorizenet_usd_aim) - both for admin and catalog sides.
For each of them you'll need to add a new setting in administration allowing you to set the currency code (e.g. USD
) to be used for - this will be stored in the database.
Then in the model class of each Authorize.NET payment gateway when it is being decided whether this payment option is allowed to be used you would need to check the customer's currency set in the session
$this->currency->getCode() // should return value e.g. 'USD'
and the currency of each Authorize.NET payment gateway and display the matching one only.