diff --git a/src/pretix/plugins/paypal/payment.py b/src/pretix/plugins/paypal/payment.py index f2b18fbff7..6455dea334 100644 --- a/src/pretix/plugins/paypal/payment.py +++ b/src/pretix/plugins/paypal/payment.py @@ -51,6 +51,7 @@ from django.utils.translation import gettext as __, gettext_lazy as _ from i18nfield.strings import LazyI18nString from paypalrestsdk.exceptions import BadRequest, UnauthorizedAccess from paypalrestsdk.openid_connect import Tokeninfo +from requests import RequestException from pretix.base.decimal import round_decimal from pretix.base.models import Event, Order, OrderPayment, OrderRefund, Quota @@ -423,6 +424,9 @@ class Paypal(BasePaymentProvider): except paypalrestsdk.exceptions.ConnectionError as e: messages.error(request, _('We had trouble communicating with PayPal')) logger.exception('Error on creating payment: ' + str(e)) + except RequestException as e: + messages.error(request, _('We had trouble communicating with PayPal')) + logger.exception('Error on creating payment: ' + str(e)) for trans in payment.transactions: for rr in trans.related_resources: