diff --git a/src/pretix/plugins/paypal/payment.py b/src/pretix/plugins/paypal/payment.py index 16931a44bc..f2b18fbff7 100644 --- a/src/pretix/plugins/paypal/payment.py +++ b/src/pretix/plugins/paypal/payment.py @@ -473,7 +473,7 @@ class Paypal(BasePaymentProvider): and payment.info_data['transactions'][0]['related_resources'][0]['sale']['state'] == 'pending' ): retry = False - except KeyError: + except (KeyError, IndexError): pass template = get_template('pretixplugins/paypal/pending.html') ctx = {'request': request, 'event': self.event, 'settings': self.settings, diff --git a/src/pretix/plugins/paypal2/payment.py b/src/pretix/plugins/paypal2/payment.py index 52526ebe00..15af77818c 100644 --- a/src/pretix/plugins/paypal2/payment.py +++ b/src/pretix/plugins/paypal2/payment.py @@ -703,7 +703,7 @@ class PaypalMethod(BasePaymentProvider): and payment.info_data['purchase_units'][0]['payments']['captures'][0]['status'] == 'pending' ): retry = False - except KeyError: + except (KeyError, IndexError): pass template = get_template('pretixplugins/paypal2/pending.html') ctx = {'request': request, 'event': self.event, 'settings': self.settings,