From eb04ee94b45f1d5d602fa9ab49d0d6e318aab3d7 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 29 May 2016 19:47:44 +0200 Subject: [PATCH] fix returns from coinifycallback --- shop/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shop/views.py b/shop/views.py index cbae2fb7..46c33027 100644 --- a/shop/views.py +++ b/shop/views.py @@ -426,11 +426,14 @@ class CoinifyCallbackView(SingleObjectMixin, View): # so, is the invoice paid now? if callbackjson['data']['state'] == 'complete': invoice.order.mark_as_paid() + + # return 200 OK + return HttpResponse('OK') else: - HttpResponseBadRequest('unsupported event') + return HttpResponseBadRequest('unsupported event') else: print "invalid callback detected" - HttpResponseBadRequest('something is fucky') + return HttpResponseBadRequest('something is fucky') class CoinifyThanksView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureClosedOrderMixin, DetailView):