diff --git a/src/pretix/plugins/paypal/payment.py b/src/pretix/plugins/paypal/payment.py index 271f384e52..16931a44bc 100644 --- a/src/pretix/plugins/paypal/payment.py +++ b/src/pretix/plugins/paypal/payment.py @@ -468,7 +468,10 @@ class Paypal(BasePaymentProvider): def payment_pending_render(self, request, payment) -> str: retry = True try: - if payment.info and payment.info_data['state'] == 'pending': + if ( + payment.info + and payment.info_data['transactions'][0]['related_resources'][0]['sale']['state'] == 'pending' + ): retry = False except KeyError: pass diff --git a/src/pretix/plugins/paypal2/payment.py b/src/pretix/plugins/paypal2/payment.py index adeb2c41e4..52526ebe00 100644 --- a/src/pretix/plugins/paypal2/payment.py +++ b/src/pretix/plugins/paypal2/payment.py @@ -698,7 +698,10 @@ class PaypalMethod(BasePaymentProvider): def payment_pending_render(self, request, payment) -> str: retry = True try: - if payment.info and payment.info_data['state'] == 'pending': + if ( + payment.info + and payment.info_data['purchase_units'][0]['payments']['captures'][0]['status'] == 'pending' + ): retry = False except KeyError: pass