Offset refunds: Catch exceptions in the right place

This commit is contained in:
Raphael Michel
2019-11-10 12:58:49 +01:00
parent df3cc1499f
commit da7e1dee3e
4 changed files with 49 additions and 3 deletions

View File

@@ -767,7 +767,7 @@ class OrderRefundView(OrderView):
if r.payment or r.provider == "offsetting":
try:
r.payment_provider.execute_refund(r)
except (PaymentException, Quota.QuotaExceededException) as e:
except PaymentException as e:
r.state = OrderRefund.REFUND_STATE_FAILED
r.save()
messages.error(self.request, _('One of the refunds failed to be processed. You should '