Fix payment cancelation of Stripe sources

This commit is contained in:
Martin Gross
2019-08-07 10:11:07 +02:00
parent 9a9de523e0
commit a0e3bbcc82

View File

@@ -366,7 +366,7 @@ def source_webhook(event, event_json, source_id, rso):
'info': str(src)
})
payment.save()
elif src.status == 'canceled' and payment.state in (Order.STATUS_PENDING, OrderPayment.PAYMENT_STATE_CREATED):
elif src.status == 'canceled' and payment.state in (OrderPayment.STATUS_PENDING, OrderPayment.PAYMENT_STATE_CREATED):
payment.info = str(src)
payment.state = OrderPayment.PAYMENT_STATE_CANCELED
payment.save()