Skip to content

Commit

Permalink
add a warning on PayPal’s payment error
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed May 16, 2020
1 parent 4a41e08 commit c2aed51
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shop_paypal/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def get_payment_request(self, cart, request):
if payment.create():
redirect_url = [link for link in payment.links if link.rel == 'approval_url'][0].href
else:
warnings.warn(str(payment.error))
redirect_url = payload['redirect_urls']['cancel_url']
return '$window.location.href="{0}";'.format(redirect_url)

Expand Down

0 comments on commit c2aed51

Please sign in to comment.