Unfortunately our fix did not fix the issue in all cases.
Try the 0.90 Euro example above, but put 3 units of it in your cart and see what happens at PayPal...
Here is a better fix which works fine for the 3 x 0.90 Euro example above and for other amounts as well:
Change from
Code:
// PayPal can't handle partial-quantity values, so fudge it here
if ($flag_treat_as_partial || $order->products[$i]['qty'] != (int)$order->products[$i]['qty']) {
$optionsLI["L_NAME$k"] = '('.$order->products[$i]['qty'].' x ) ' . $optionsLI["L_NAME$k"];
$optionsLI["L_AMT$k"] = zen_round($order->products[$i]['qty'] * $order->products[$i]['final_price'], $currencies->currencies[$_SESSION['currency']]['decimal_places']);
$optionsLI["L_TAXAMT$k"] = zen_calculate_tax(zen_round($order->products[$i]['qty'] * $order->products[$i]['final_price'], $currencies->currencies[$_SESSION['currency']]['decimal_places']), $order->products[$i]['tax']);
$optionsLI["L_QTY$k"] = 1;
} else {
$optionsLI["L_AMT$k"] = $order->products[$i]['final_price'];
$optionsLI["L_QTY$k"] = $order->products[$i]['qty'];
$optionsLI["L_TAXAMT$k"] = zen_calculate_tax(1 * $order->products[$i]['final_price'], $order->products[$i]['tax']);
}
to
Code:
// PayPal can't handle partial-quantity values, so fudge it here
if ($flag_treat_as_partial || $order->products[$i]['qty'] != (int)$order->products[$i]['qty']) {
$optionsLI["L_NAME$k"] = '('.$order->products[$i]['qty'].' x ) ' . $optionsLI["L_NAME$k"];
// r.l.3
$optionsLI["L_AMT$k"] = round(zen_round($order->products[$i]['qty'] * $order->products[$i]['final_price'], $currencies->currencies[$_SESSION['currency']]['decimal_places']), 2);
$optionsLI["L_TAXAMT$k"] = round(zen_calculate_tax(zen_round($order->products[$i]['qty'] * $order->products[$i]['final_price'], $currencies->currencies[$_SESSION['currency']]['decimal_places']), $order->products[$i]['tax']), 2);
$optionsLI["L_QTY$k"] = 1;
} else {
// !!! r.l.2
$optionsLI["L_AMT$k"] = round($order->products[$i]['final_price'], $currencies->currencies[$_SESSION['currency']]['decimal_places']);
$optionsLI["L_QTY$k"] = $order->products[$i]['qty'];
// !!! r.l.1
$optionsLI["L_TAXAMT$k"] = round(zen_calculate_tax(1 * $order->products[$i]['final_price'], $order->products[$i]['tax']), $currencies->currencies[$_SESSION['currency']]['decimal_places']);
}
#die('decplaces: ' . $currencies->currencies[$_SESSION['currency']]['decimal_places']);
Bookmarks