I believe the problem lies in this line in the file:
/includes/modules/payment/paypalwpp.php
$response = $doPayPal->DoExpressCheckoutPayment($_SESSION['paypal_ec_token'],
$_SESSION['paypal_ec_payer_id'],
number_format((isset($options['AMT']) ? $options['AMT'] : $order_amount), 2),
$options);
The value of $options['AMT'] may already contain a formatted string such as 1,050.99. In the line above, it is formatted again by the number_format function which may now result to a truncated value of 1. This causes a mismatch now with the original value which should still be 1050.99. This may not affect values less than 1000.
To fix, I changed the above code to:
if (isset($options['AMT']))
{
$response = $doPayPal->DoExpressCheckoutPayment($_SESSION['paypal_ec_token'],
$_SESSION['paypal_ec_payer_id'],
$options['AMT'],
$options);
}
else
{
$response = $doPayPal->DoExpressCheckoutPayment($_SESSION['paypal_ec_token'],
$_SESSION['paypal_ec_payer_id'],
number_format($order_amount, 2),
$options);
}
Hope that helps!
packet8bit
Bookmarks