From 8a354afcca58e471728d3da54ade19da3dbdc91d Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 31 May 2016 21:41:31 +0200 Subject: [PATCH] fix coinify callback --- shop/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shop/views.py b/shop/views.py index 262c3eed..12cbe986 100644 --- a/shop/views.py +++ b/shop/views.py @@ -459,9 +459,9 @@ class CoinifyCallbackView(SingleObjectMixin, View): if callbackjson['event'] == 'invoice_state_change' or callbackjson['event'] == 'invoice_manual_resend': # find coinify invoice in db try: - coinifyinvoice = CoinifyAPIInvoice.objects.get(invoicejson__id=['data']['id']) + coinifyinvoice = CoinifyAPIInvoice.objects.get(invoicejson__id=callbackjson['data']['id']) except CoinifyAPIInvoice.DoesNotExist: - print "unable to find CoinifyAPIInvoice with id %s" % ['data']['id'] + print "unable to find CoinifyAPIInvoice with id %s" % callbackjson['data']['id'] return HttpResponseBadRequest('bad coinifyinvoice id') # save new invoice payload @@ -469,7 +469,7 @@ class CoinifyCallbackView(SingleObjectMixin, View): invoice.payload = callbackjson['data'] invoice.save() - # so, is the invoice paid now? + # so, is the invoice paid in full now? if callbackjson['data']['state'] == 'complete': invoice.order.mark_as_paid()