I have tried this below code in catalog/controller/payment/pp_standard.php
. it works fine. For example, My product rate is 2450 INR. When I choose paypal option it would convert the INR rate into USD rate and then it would redirect to paypal.com successfully.
But, I have enabled paypal express checkout also. So, When I choose paypal express checkout option it doesn't redirect to paypal.com. because of currency problem (I get currency is not supporrted error). How do I convert the INR currency to USD currency before passing to paypal in opencart?
Note : I need a solution for Paypal Express Checkout catalog/controller/payment/pp_express.php
& catalog/model/payment/pp_express.php
$currencies = array(
'AUD',
'CAD',
'EUR',
'GBP',
'JPY',
'USD',
'NZD',
'CHF',
'HKD',
'SGD',
'SEK',
'DKK',
'PLN',
'NOK',
'HUF',
'CZK',
'ILS',
'MXN',
'MYR',
'BRL',
'PHP',
'TWD',
'THB',
'TRY'
);
if (!in_array(strtoupper($this->currency->getCode()), $currencies))
{
$order_info['currency_code'] = 'USD';
}