store the state of the payment regardless of the state

control.html shows the banner that the payment is in review depending on payment.info
This commit is contained in:
Lukas Bockstaller
2026-08-06 11:38:08 +02:00
parent ea792e76b2
commit 588abffdd3
+2
View File
@@ -424,6 +424,8 @@ def webhook(request, *args, **kwargs):
**event_json,
'_order_state': sale.dict(),
})
payment.info = json.dumps(sale.dict())
payment.save()
if payment.state == OrderPayment.PAYMENT_STATE_CONFIRMED and sale['status'] in ('PARTIALLY_REFUNDED', 'REFUNDED', 'COMPLETED'):
if event_json['resource_type'] == 'refund':