PPv2: Surface error-messages if XHR-call fails

This commit is contained in:
Martin Gross
2022-05-31 19:23:57 +02:00
parent 823de60e8c
commit e20c2c56f0
2 changed files with 7 additions and 2 deletions

View File

@@ -151,7 +151,7 @@ class XHRView(View):
}
paypal_order = prov._create_paypal_order(request, None, cart)
r = JsonResponse(paypal_order.dict())
r = JsonResponse(paypal_order.dict() if paypal_order else {})
r._csp_ignore = True
return r