From 2e13525ad72b8d83c9e98a13e4db0b044e4e6454 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 11 Jul 2017 07:31:15 +0200 Subject: [PATCH] only mark as paid if not already paid (aka. dont create tickets again if we see a double callback) --- src/shop/coinify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shop/coinify.py b/src/shop/coinify.py index b90d3c09..1077f97b 100644 --- a/src/shop/coinify.py +++ b/src/shop/coinify.py @@ -18,7 +18,7 @@ def process_coinify_invoice_json(invoicejson, order): ) # if the order is paid in full call the mark as paid method now - if invoicejson['state'] == 'complete': + if invoicejson['state'] == 'complete' and not coinifyinvoice.order.paid: coinifyinvoice.order.mark_as_paid() return coinifyinvoice