forked from CGM_Public/pretix_original
PayPal error handling
This commit is contained in:
@@ -305,7 +305,7 @@ class Paypal(BasePaymentProvider):
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if not pp_refund.success():
|
if not pp_refund.success():
|
||||||
raise PaymentException(_('Refunding the amount via PayPal failed: {}').format(refund.error))
|
raise PaymentException(_('Refunding the amount via PayPal failed: {}').format(pp_refund.error))
|
||||||
else:
|
else:
|
||||||
sale = paypalrestsdk.Payment.find(refund.payment.info_data['id'])
|
sale = paypalrestsdk.Payment.find(refund.payment.info_data['id'])
|
||||||
refund.payment.info = json.dumps(sale.to_dict())
|
refund.payment.info = json.dumps(sale.to_dict())
|
||||||
|
|||||||
Reference in New Issue
Block a user