fix saving of coinify callbacks
This commit is contained in:
parent
eb04ee94b4
commit
ff94193fcc
|
@ -401,8 +401,8 @@ class CoinifyCallbackView(SingleObjectMixin, View):
|
||||||
|
|
||||||
# save callback to db
|
# save callback to db
|
||||||
callbackobject = CoinifyAPICallback.objects.create(
|
callbackobject = CoinifyAPICallback.objects.create(
|
||||||
headers=json.dumps(headerdict),
|
headers=headerdict,
|
||||||
payload=request.body,
|
payload=json.loads(request.body),
|
||||||
order=self.get_object()
|
order=self.get_object()
|
||||||
)
|
)
|
||||||
if sdk.validate_callback(request.body, signature):
|
if sdk.validate_callback(request.body, signature):
|
||||||
|
@ -432,7 +432,7 @@ class CoinifyCallbackView(SingleObjectMixin, View):
|
||||||
else:
|
else:
|
||||||
return HttpResponseBadRequest('unsupported event')
|
return HttpResponseBadRequest('unsupported event')
|
||||||
else:
|
else:
|
||||||
print "invalid callback detected"
|
print "invalid coinify callback detected"
|
||||||
return HttpResponseBadRequest('something is fucky')
|
return HttpResponseBadRequest('something is fucky')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue