Details
Description
In some cases, it is possible to encounter an issue where a transaction amount is less than the amount the non-merchant gateway intends to apply.
For example, an invoice whose amount due is "1.5501" is passed to PayPal, and PayPal rounds this to "1.55". Upon payment, Blesta receives a notice from PayPal that a payment was received in the amount of "1.55". The gateway, however, says that the amount to apply to an invoice is still "1.5501".
This is a case of attempting to apply a larger amount to an invoice than was paid. As of CORE-1706, this errant behavior is rejected, the amounts to applied ignored (for being invalid), and the entire payment is left as a credit.
This task should resolve the issue from being encountered during normal use by filtering the amounts-to-apply received from non-merchant gateways. The transaction amount precision should be used as a basis for precision, and each amount-to-apply should be rounded down to the same precision.
This task is unnecessary.
CORE-1741and its related tasks work around it.