forked from CGM_Public/pretix_original
Fix #1230 -- Stripe: Recognize canceled sources in webhook
This commit is contained in:
@@ -348,6 +348,10 @@ def source_webhook(event, event_json, source_id, rso):
|
|||||||
'info': str(src)
|
'info': str(src)
|
||||||
})
|
})
|
||||||
payment.save()
|
payment.save()
|
||||||
|
elif src.status == 'canceled' and payment.state in (Order.STATUS_PENDING, OrderPayment.PAYMENT_STATE_CREATED):
|
||||||
|
payment.info = str(src)
|
||||||
|
payment.state = OrderPayment.PAYMENT_STATE_CANCELED
|
||||||
|
payment.save()
|
||||||
|
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user