pass order to save_coinify_callback

This commit is contained in:
Thomas Steen Rasmussen 2017-07-11 07:02:17 +02:00
parent 588a36ee56
commit 1d23989df1
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ def process_coinify_invoice_json(invoicejson, order):
return coinifyinvoice
def save_coinify_callback(request):
def save_coinify_callback(request, order):
# first make a dict with all HTTP_ headers
headerdict = {}
for key, value in list(request.META.items()):
@ -42,7 +42,7 @@ def save_coinify_callback(request):
headers=headerdict,
body=request.body,
payload=parsed,
order=self.get_object(),
order=order,
)
return callbackobject

View file

@ -559,7 +559,7 @@ class CoinifyCallbackView(SingleObjectMixin, View):
def post(self, request, *args, **kwargs):
# save callback and parse json payload
callbackobject = save_coinify_callback(request)
callbackobject = save_coinify_callback(request, self.get_object())
# do we have a json body?
if not callbackobject.payload: