So I found the bug that causes 5.00 turning into 500 that I stated here:
Quote:
Originally Posted by Barbecue_Eater
Greetings.
We're using vBulletin 4.2.2 PL 1 and tried different currencies (USD and EUR), the specified amount (f.e. "5.0") will always ignore the dot after being redirected to paypal
For example I choose: 5.00, get redirected to paypal and it shows up as 500 USD/EUR.
This must be a bug of some kind and also doesn't get fixed when I chose USD instead EUR.
|
The bug is caused by:
put this in your dodonate.php file replacing line 23 with these and see the difference:
PHP Code:
echo "actual amount: ".$_REQUEST['amount']."<br/>";
$vbulletin->input->clean_gpc('p', 'amount', TYPE_UNUM);
echo "broken amount by the gpc function: ".$vbulletin->GPC['amount']."<br/>";
exit();
do not use this on your actual vbulletin systems, it's only for the dbtech team!
the result for me is:
Quote:
actual amount: 5.00
broken amount by the gpc function: 500
|
I just don't want to fix this by myself as this is a good hint for you guys to fix something and also I don't want to make any errors regarding security, as clean_gpc is needed somehow anyways.
I don't know how to use it and at the same time fix the bug....
Would you please fix this asap?
Regards