- Issue created by @besek
- Status changed to Fixed
6 months ago 11:07am 16 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.
For specific prices in the order, the price passed to PayU might be slightly smaller than defined in the order. This may lead to serious issue when users are paying 0,01 less than they should.
The issue is caused by Float being used to represent currency. Problem is described in Commerce documentation: https://docs.drupalcommerce.org/commerce2/developer-guide/pricing/prices, linking specifally to: https://stackoverflow.com/questions/3730019/why-not-use-double-or-float-... as a description why Float should not be used to represent currency.
My suggestion for fix is in the patch.
This issue is really critical, as customer, in case of some prices, may pay different price (just 0,01 lower) than they should. But it may lead to lot of accounting issues and cause problems when total order amount is compared with amount paid.
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.