Lax Mariappan Posted February 10, 2019 Share Posted February 10, 2019 PayPal express checkout and pay with credit card methods have a strange issue with gift wrapping costs The store has 4 currencies, all the values in the cart are getting converted correctly except the gift wrapping price. Did anyone encounter this issue? PayPal didn't set the "covertPrice" method's parameter convert to true. public function formatPrice($price) { $context = Context::getContext(); $context_currency = $context->currency; $paypal = Module::getInstanceByName('paypal'); if ($paypal->needConvert()) { $price = Tools::convertPrice($price, $context_currency, false); } $price = number_format($price, Paypal::getDecimal(), ".", ''); return $price; } If I change it to true, that converts the currency value to selected currency, I get error code 0 the last step of checkout. Link to comment Share on other sites More sharing options...
bipeen Posted July 26, 2020 Share Posted July 26, 2020 (edited) I changed a line of code in a file modules/paypal/classes/MethodEC.php as below to get a hot fix. I replaced $wrapping_price = $this->formatPrice($wrapping_price); with $wrapping_price = $this->formatPrice($wrapping_price*0.009524); where the value 0.009524 is the exchange rate ratio. Edited July 26, 2020 by bipeen (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now