fix returns from coinifycallback
This commit is contained in:
parent
a6b50c79fc
commit
eb04ee94b4
|
@ -426,11 +426,14 @@ class CoinifyCallbackView(SingleObjectMixin, View):
|
||||||
# so, is the invoice paid now?
|
# so, is the invoice paid now?
|
||||||
if callbackjson['data']['state'] == 'complete':
|
if callbackjson['data']['state'] == 'complete':
|
||||||
invoice.order.mark_as_paid()
|
invoice.order.mark_as_paid()
|
||||||
|
|
||||||
|
# return 200 OK
|
||||||
|
return HttpResponse('OK')
|
||||||
else:
|
else:
|
||||||
HttpResponseBadRequest('unsupported event')
|
return HttpResponseBadRequest('unsupported event')
|
||||||
else:
|
else:
|
||||||
print "invalid callback detected"
|
print "invalid callback detected"
|
||||||
HttpResponseBadRequest('something is fucky')
|
return HttpResponseBadRequest('something is fucky')
|
||||||
|
|
||||||
|
|
||||||
class CoinifyThanksView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureClosedOrderMixin, DetailView):
|
class CoinifyThanksView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureClosedOrderMixin, DetailView):
|
||||||
|
|
Loading…
Reference in a new issue