[FIX] payment_{paypal,alipay}: update log for invalid notification origin
When the user configures PayPal/Alipay and in his PayPal/Alipay account he set the IPN address to the webhook_url he receives a notification from PayPal/Alipay with data. Then origin of that notification is checked and when PayPal/Alipay sends 'invalid'/'false' as a response the error occurs. To fix this issue the log is updated into a warning. sentry-4116633764 closes odoo/odoo#121476 X-original-commit: 100f2526e91d781a01d959d08dc0ccfae4389061 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com> Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
This commit is contained in:
@@ -94,7 +94,7 @@ class AlipayController(http.Controller):
|
||||
else:
|
||||
response_content = response.text
|
||||
if response_content != 'true':
|
||||
_logger.error(
|
||||
_logger.warning(
|
||||
"Alipay did not confirm the origin of the notification with data:\n%s", payload
|
||||
)
|
||||
raise Forbidden()
|
||||
|
||||
@@ -215,7 +215,7 @@ class PaypalController(http.Controller):
|
||||
else:
|
||||
response_content = response.text
|
||||
if response_content != 'VERIFIED':
|
||||
_logger.error(
|
||||
_logger.warning(
|
||||
"PayPal did not confirm the origin of the notification with data:\n%s",
|
||||
pprint.pformat(notification_data),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user