Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
find:
Code: Select all
protected function validateCoupon() {
Code: Select all
protected function convertCurrencies($currency) {
$list = array('INR',
);
if ($this->currency->has($currency) && in_array($currency, $list)) {
return true;
}
}
Code: Select all
$price = $this->currency->format($unit_price, $this->session->data['currency']);
$total = $this->currency->format($unit_price * $product['quantity'], $this->session->data['currency']);
Code: Select all
$price = ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->format($this->currency->convert($unit_price, $this->session->data['currency'], 'USD'), $this->session->data['currency']) : $this->currency->format($unit_price, $this->session->data['currency']));
$total = ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->format($this->currency->convert($unit_price, $this->session->data['currency'], 'USD') * $product['quantity'], $this->session->data['currency']) : $this->currency->format($unit_price * $product['quantity'], $this->session->data['currency']));
Code: Select all
$recurring_price = $this->currency->format($this->tax->calculate($product['recurring']['trial_price'] * $product['quantity'], $product['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
Code: Select all
$recurring_price = ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->format($this->tax->calculate($this->currency->convert($product['recurring']['trial_price'], $this->session->data['currency'], 'USD') * $product['quantity'], $product['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) : $this->currency->format($this->tax->calculate($product['recurring']['trial_price'] * $product['quantity'], $product['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']));
Code: Select all
$recurring_price = $this->currency->format($this->tax->calculate($product['recurring']['price'] * $product['quantity'], $product['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
Code: Select all
$recurring_price = ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->format($this->tax->calculate($this->currency->convert($product['recurring']['price'], $this->session->data['currency'], 'USD') * $product['quantity'], $product['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']) : $this->currency->format($this->tax->calculate($product['recurring']['price'] * $product['quantity'], $product['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']));
Code: Select all
'text' => $this->currency->format($total['value'], $this->session->data['currency']),
Code: Select all
'text' => ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->format($this->currency->convert($total['value'], $this->session->data['currency'], 'USD'), $this->session->data['currency']) : $this->currency->format($total['value'], $this->session->data['currency'])),
Code: Select all
'price' => $product['price'],
'total' => $product['total'],
'tax' => $this->tax->getTax($product['price'], $product['tax_class_id']),
Code: Select all
'price' => ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->convert($product['price'], $this->session->data['currency'], 'USD'): $product['price']),
'total' => ($this->convertCurrencies($this->session->data['currency']) ? $this->currency->convert($product['total'], $this->session->data['currency'], 'USD'): $product['total']),
'tax' => ($this->convertCurrencies($this->session->data['currency']) ? $this->tax->getTax($this->currency->convert($product['price'], $this->session->data['currency'], 'USD'), $product['tax_class_id']) : $this->tax->getTax($product['price'], $product['tax_class_id'])),
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
It still gives a validation / error as shown below :
Currency is not supported.
Even if a solution converts INR to USD and paypal payment is processed in USD its fine.
Kindly suggest
This message is provided by PayPal's response, not by OC.Currency is not supported.
Followed are a list of allowed currency codes: https://developer.paypal.com/docs/class ... ncy_codes/ . Followed is also alternative used with Shopify: https://ecommerce.shopify.com/c/ecommer ... age-484398 . You might want to try the same with Opencart noticing if it does solve the issue.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
By doing that, the outputted amount would be differed from the customer's currency preferences on your store as a converted amount would be shown rather than the demonstrated amount before the converted amount has been made on the invoice.If my display currency on website is INR, can u help that in someway while I proceed to checkout it displays the corresponding USD.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Source: https://build.ooo/code/34178751/paypal- ... y-checkoutPayPal doesn't support Indian currency so far. My best guess would be to be use 'USD' as the currency. PayPal will itself convert it to 'INR' and send it to your bank account.
You cannot maintain an INR balance on PayPal account due to some local regulations, instead your balance is automatically swept to your local bank account.
Your customers will pay in USD, you'll receive USD, PayPal will convert USD to INR and send to your bank account.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: Bing [Bot] and 327 guests