Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pp_express problem with product prices over 1000 #2216

Closed
bmett opened this issue Nov 6, 2014 · 0 comments
Closed

pp_express problem with product prices over 1000 #2216

bmett opened this issue Nov 6, 2014 · 0 comments

Comments

@bmett
Copy link

bmett commented Nov 6, 2014

The Paypal Express payment module throws an error when one (or more) products in the cart have a price over 1000.
Reason for this is the number_format call in /catalog/model/payment/pp_express in the paymentRequestInfo() function. On line 182 number_format is called without defining the thousands delimiter which defaults to a comma. Product prices over 1000 will therefore be formatted like this: 1,000.00
This causes the addition of the $item_total variable to interprete the price as 0.
$item_total will end up being different to the sum of all product prices paypal calculates and that will cause paypal to throw back an error.
Can be fixed by either telling number_format to use an empty string as the thousands delimiter or by using (float) on the price.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants