only mark as paid if not already paid (aka. dont create tickets again if we see a double callback)

This commit is contained in:
Thomas Steen Rasmussen 2017-07-11 07:31:15 +02:00
parent ec120bca39
commit 2e13525ad7

View file

@ -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