When customer pays using the PayPal Standard payment method in a different currency to the store default and a coupon or voucher is used that is just more than the net value of the products, the total sent to PayPal is wrong.
The problem seem to be that when 'Shipping, Handling, Discounts & Taxes' is negative, causing the PayPal discount_amount_cart field to be used, the discount is passed through the currency converter twice.
To fix, in \catalog\controller\payment\pp_standard.php line 95 change:
Code: Select all
$this->data['discount_amount_cart'] -= $this->currency->format($total, $currency, false, false);
to:
Code: Select all
$this->data['discount_amount_cart'] -= $total;
as the currency conversion is all ready done by line 83:
Code: Select all
$total = $this->currency->format($order_info['total'] - $this->cart->getSubTotal(), $currency, false, false);