pass order to save_coinify_callback
This commit is contained in:
parent
588a36ee56
commit
1d23989df1
|
@ -24,7 +24,7 @@ def process_coinify_invoice_json(invoicejson, order):
|
||||||
return coinifyinvoice
|
return coinifyinvoice
|
||||||
|
|
||||||
|
|
||||||
def save_coinify_callback(request):
|
def save_coinify_callback(request, order):
|
||||||
# first make a dict with all HTTP_ headers
|
# first make a dict with all HTTP_ headers
|
||||||
headerdict = {}
|
headerdict = {}
|
||||||
for key, value in list(request.META.items()):
|
for key, value in list(request.META.items()):
|
||||||
|
@ -42,7 +42,7 @@ def save_coinify_callback(request):
|
||||||
headers=headerdict,
|
headers=headerdict,
|
||||||
body=request.body,
|
body=request.body,
|
||||||
payload=parsed,
|
payload=parsed,
|
||||||
order=self.get_object(),
|
order=order,
|
||||||
)
|
)
|
||||||
|
|
||||||
return callbackobject
|
return callbackobject
|
||||||
|
|
|
@ -559,7 +559,7 @@ class CoinifyCallbackView(SingleObjectMixin, View):
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
# save callback and parse json payload
|
# 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?
|
# do we have a json body?
|
||||||
if not callbackobject.payload:
|
if not callbackobject.payload:
|
||||||
|
|
Loading…
Reference in a new issue