diff --git a/src/pretix/plugins/paypal2/views.py b/src/pretix/plugins/paypal2/views.py index abdb69076b..8856fcebe9 100644 --- a/src/pretix/plugins/paypal2/views.py +++ b/src/pretix/plugins/paypal2/views.py @@ -133,7 +133,9 @@ class XHRView(View): if order: lp = order.payments.last() - if lp and lp.state not in (OrderPayment.PAYMENT_STATE_CONFIRMED, OrderPayment.PAYMENT_STATE_REFUNDED): + if lp and lp.fee and lp.state not in ( + OrderPayment.PAYMENT_STATE_CONFIRMED, OrderPayment.PAYMENT_STATE_REFUNDED + ): fee = lp.fee.value - prov.calculate_fee(order.pending_sum - lp.fee.value) else: fee = prov.calculate_fee(order.pending_sum)