add a few debug lines

This commit is contained in:
Thomas Steen Rasmussen 2016-06-01 01:30:05 +02:00
parent ed54cde150
commit acb5d9c0da

View file

@ -392,6 +392,7 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn
# check if it expired
if parse_datetime(order.coinifyapiinvoice.invoicejson['expire_time']) < timezone.now():
# this coinifyinvoice expired, delete it
print "deleting expired coinifyinvoice id %s" % order.coinifyapiinvoice.invoicejson['id']
order.coinifyapiinvoice.delete()
order = self.get_object()
@ -426,11 +427,11 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn
return HttpResponseRedirect(reverse_lazy('shop:order_detail', kwargs={'pk': self.get_object().pk}))
else:
# save this coinify invoice
CoinifyAPIInvoice.objects.create(
coinifyinvoice = CoinifyAPIInvoice.objects.create(
invoicejson = response['data'],
order = order,
)
print "created new coinifyinvoice id %s" % coinifyinvoice.invoicejson['id']
return super(CoinifyRedirectView, self).dispatch(
request, *args, **kwargs
)