From f7c61e94126784877183fe22e43852b592c06a3a Mon Sep 17 00:00:00 2001 From: Saurabh Choraria Date: Thu, 11 May 2023 12:08:58 +0000 Subject: [PATCH] [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) Signed-off-by: Saurabh Choraria (sauc) --- addons/payment_alipay/controllers/main.py | 2 +- addons/payment_paypal/controllers/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/payment_alipay/controllers/main.py b/addons/payment_alipay/controllers/main.py index e1355b6f38f..2eea9e967d9 100644 --- a/addons/payment_alipay/controllers/main.py +++ b/addons/payment_alipay/controllers/main.py @@ -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() diff --git a/addons/payment_paypal/controllers/main.py b/addons/payment_paypal/controllers/main.py index 47292158ebc..9337afa2cbd 100644 --- a/addons/payment_paypal/controllers/main.py +++ b/addons/payment_paypal/controllers/main.py @@ -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), )