Summary:
Decimal item amount if $config['locale'] = 'de_DE.UTF8';
Detailed Description:
PayPal returns the error on trying to checkout:
---------------------------------------------
"The link you have used to enter the PayPal system contains an incorrectly
formatted item amount."
-------------------------------------------
In the config.php on the installation with the issue there is a German locale:
$config['locale'] = 'de_DE.UTF8';
It's weird, but sprinf functions does change the decimal point to comma if
$config['locale'] is not English.
Try this test.php
--------------------------------------------------
<?php
setlocale (LC_ALL, 'de_DE.UTF8');
$key = "field";
$value = 2.4;
$fmt = 'input type="hidden" name="%s" value="%s"/>'."\n";
echo sprintf($fmt,$key,$value);
?>
You will see that sprintf() changes the number format to:
<input type="hidden" name="field" value="2,4"/>
If you comment the setlocale() in the first line the output will be correct:
input type="hidden" name="field" value="2.4"/>