Fix a new bug in Stripe webhooks PRETIXEU-64

This commit is contained in:
Raphael Michel
2019-09-19 10:36:33 +02:00
parent b7dea16db3
commit 59b7f0a03d

View File

@@ -179,7 +179,7 @@ def webhook(request, *args, **kwargs):
) )
return func(rso.order.event, event_json, objid, rso) return func(rso.order.event, event_json, objid, rso)
except ReferencedStripeObject.DoesNotExist: except ReferencedStripeObject.DoesNotExist:
pass return HttpResponse("Unable to detect event", status=200)
elif hasattr(request, 'event') and func != paymentintent_webhook: elif hasattr(request, 'event') and func != paymentintent_webhook:
# This is a legacy integration from back when didn't have ReferencedStripeObject. This can't happen for # This is a legacy integration from back when didn't have ReferencedStripeObject. This can't happen for
# payment intents or charges connected with payment intents since they didn't exist back then. Our best # payment intents or charges connected with payment intents since they didn't exist back then. Our best