[FIX] payment_(aps,flutterwave): add missing loggers
closes odoo/odoo#83957 Related: odoo/documentation#2242 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -34,6 +34,8 @@ class APSController(http.Controller):
|
||||
|
||||
:param dict data: The notification data.
|
||||
"""
|
||||
_logger.info("Handling redirection from APS with data:\n%s", pprint.pformat(data))
|
||||
|
||||
# Check the integrity of the notification.
|
||||
tx_sudo = request.env['payment.transaction'].sudo()._get_tx_from_notification_data(
|
||||
'aps', data
|
||||
|
||||
@@ -14,6 +14,7 @@ from odoo.addons.payment_aps.tests.common import APSCommon
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestProcessingFlows(APSCommon):
|
||||
|
||||
@mute_logger('odoo.addons.payment_aps.controllers.main')
|
||||
def test_redirect_notification_triggers_processing(self):
|
||||
""" Test that receiving a redirect notification triggers the processing of the notification
|
||||
data. """
|
||||
@@ -43,6 +44,7 @@ class TestProcessingFlows(APSCommon):
|
||||
self._make_http_post_request(url, data=self.notification_data)
|
||||
self.assertEqual(handle_notification_data_mock.call_count, 1)
|
||||
|
||||
@mute_logger('odoo.addons.payment_aps.controllers.main')
|
||||
def test_redirect_notification_triggers_signature_check(self):
|
||||
""" Test that receiving a redirect notification triggers a signature check. """
|
||||
self._create_transaction('redirect')
|
||||
|
||||
@@ -24,6 +24,8 @@ class FlutterwaveController(http.Controller):
|
||||
|
||||
:param dict data: The notification data.
|
||||
"""
|
||||
_logger.info("Handling redirection from Flutterwave with data:\n%s", pprint.pformat(data))
|
||||
|
||||
# Handle the notification data.
|
||||
if data.get('status') != 'cancelled':
|
||||
request.env['payment.transaction'].sudo()._handle_notification_data('flutterwave', data)
|
||||
|
||||
@@ -15,6 +15,7 @@ from odoo.addons.payment_flutterwave.tests.common import FlutterwaveCommon
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestProcessingFlows(FlutterwaveCommon, PaymentHttpCommon):
|
||||
|
||||
@mute_logger('odoo.addons.payment_flutterwave.controllers.main')
|
||||
def test_redirect_notification_triggers_processing(self):
|
||||
""" Test that receiving a redirect notification triggers the processing of the notification
|
||||
data. """
|
||||
|
||||
Reference in New Issue
Block a user