How to set current currency in paypal in magento?

When I select paypal in the payment method, then its base currency is selected in the admin panel. But I want to transfer the current currency selected on the front site.

I know Midify paypal Api, but there were some files you want to make changes, please describe briefly.

So, any body knows, please help me.

Thanks Vijay

+3
source share
1 answer

You can override the paypal api and change the value sent to paypal, and you will probably have to override other methods that check the amounts that are paid.

$ grep getBaseGran app/code/core/Mage/Paypal -rsn
app/code/core/Mage/Paypal/Model/Express/Checkout.php:180: $this->_quote->getBaseGrandTotal(),

app/code/core/Mage/Paypal/Model/Express/Checkout.php:246: $this->_api->setAmount($this->_quote->getBaseGrandTotal())

app/code/core/Mage/Paypal/Model/Express/Checkout.php:283: if (Mage::helper('paypal')->areCartLineItemsValid($items, $totals, $this->_quote->getBaseGrandTotal())) {

app/code/core/Mage/Paypal/Model/Standard.php:147: $grandTotal = $order->getBaseGrandTotal();
0
source

Source: https://habr.com/ru/post/1777915/


All Articles