From 2aa989c29368bea8f65e1c730e08d15ca6cc58a9 Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Thu, 4 Jul 2024 15:12:53 +0200 Subject: [PATCH] PPv2: Do not fail hard on refunds that are based on manually confirmed payments (Fixes: #PRETIXEU-AC1) --- src/pretix/plugins/paypal2/payment.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pretix/plugins/paypal2/payment.py b/src/pretix/plugins/paypal2/payment.py index 2f33edc0d2..1b2204cdd2 100644 --- a/src/pretix/plugins/paypal2/payment.py +++ b/src/pretix/plugins/paypal2/payment.py @@ -949,6 +949,9 @@ class PaypalMethod(BasePaymentProvider): } }) response = self.client.execute(req) + except KeyError: + raise PaymentException(_('Refunding the amount via PayPal failed: The original payment does not contain ' + 'the required information to issue an automated refund.')) except IOError as e: refund.order.log_action('pretix.event.order.refund.failed', { 'local_id': refund.local_id,