PayPal error handling

This commit is contained in:
Raphael Michel
2018-08-16 09:36:16 +02:00
parent 4536f96493
commit be3b890e2f

View File

@@ -305,7 +305,7 @@ class Paypal(BasePaymentProvider):
}
})
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:
sale = paypalrestsdk.Payment.find(refund.payment.info_data['id'])
refund.payment.info = json.dumps(sale.to_dict())