From 4da804bfe7013ae24e359dcbf6062010916521b4 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Mon, 2 Jul 2018 15:01:34 +0200 Subject: [PATCH] Invalide la facture Comnpay avant de continuer le paiement. --- cotisations/payment_methods/comnpay/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cotisations/payment_methods/comnpay/models.py b/cotisations/payment_methods/comnpay/models.py index 83a6f534..4fc509af 100644 --- a/cotisations/payment_methods/comnpay/models.py +++ b/cotisations/payment_methods/comnpay/models.py @@ -26,5 +26,7 @@ class ComnpayPayment(models.Model): ) def end_payment(self, invoice, request): + invoice.valid = False + invoice.save() content = comnpay(invoice, request) return render(request, 'cotisations/payment.html', content)