From d006b0ff6a297815e2ef29dd34bd5901c3fb3812 Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Thu, 12 Aug 2021 14:54:37 +0200 Subject: [PATCH] Payment/Sixpay: Do not log failure twice --- payment_sixpay/indico_payment_sixpay/controllers.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/payment_sixpay/indico_payment_sixpay/controllers.py b/payment_sixpay/indico_payment_sixpay/controllers.py index 8a39650..92c16dc 100644 --- a/payment_sixpay/indico_payment_sixpay/controllers.py +++ b/payment_sixpay/indico_payment_sixpay/controllers.py @@ -152,10 +152,7 @@ class SixpayNotificationHandler(RHSixpayBase): def _process(self): """Process the reply from SIXPay about the transaction.""" - try: - self._process_confirmation() - except TransactionFailure as exc: - SixpayPaymentPlugin.logger.warning('SIXPay transaction failed during %s: %s', exc.step, exc.details) + self._process_confirmation() def _process_confirmation(self): """Process the confirmation response inside indico.""" @@ -339,8 +336,7 @@ class UserSuccessHandler(SixpayNotificationHandler): def _process(self): try: self._process_confirmation() - except TransactionFailure as exc: - SixpayPaymentPlugin.logger.warning('SIXPay transaction failed during %s: %s', exc.step, exc.details) + except TransactionFailure: flash(_('Your payment could not be confirmed. Please contact the event organizers.'), 'warning') else: flash(_('Your payment has been confirmed.'), 'success')