-
- Downloads
[FIX] payment_payulatam: Adapt rounding method if webhook
Before this commit: If a payulatam payment is received from the confirmation page (so, with the webhook). If the value have some decimals it might be rounded in the wrong way. As such, the generated signature to compare with is wrong and the payment validation cancelled After this commit If we cross compare the signature generation documentation: https://developers.payulatam.com/latam/en/docs/integrations/webcheckout-integration/response-page.html#signature-validation https://developers.payulatam.com/latam/en/docs/integrations/webcheckout-integration/confirmation-page.html#signature-validation We notice that the `new_value` computation is slightly different depending on the return. The one we currently use for both method is the "return" one which is computed differently from the "confirm" one. With this change of code a "confirmation" page payment will be validated as intended. I also changed the log level from warning to exception so that the traceback and exception message is logged. Before this commit there was just a generic warning message opw-3018628 closes odoo/odoo#113768 Signed-off-by:Loan (LSE) <lse@odoo.com> Signed-off-by:
Antoine Vandevenne (anv) <anv@odoo.com>
Showing
- addons/payment_payulatam/controllers/main.py 3 additions, 2 deletionsaddons/payment_payulatam/controllers/main.py
- addons/payment_payulatam/models/payment_acquirer.py 18 additions, 7 deletionsaddons/payment_payulatam/models/payment_acquirer.py
- addons/payment_payulatam/tests/test_payulatam.py 6 additions, 3 deletionsaddons/payment_payulatam/tests/test_payulatam.py