pass request to create_coinify_invoice()
This commit is contained in:
parent
45a5f58ddf
commit
3010033b75
|
@ -125,7 +125,7 @@ def get_coinify_invoice(coinify_invoiceid, order):
|
|||
return coinifyinvoice
|
||||
|
||||
|
||||
def create_coinify_invoice(order):
|
||||
def create_coinify_invoice(order, request):
|
||||
# put args for API request together
|
||||
invoicedict = {
|
||||
'amount': float(order.total),
|
||||
|
|
|
@ -545,7 +545,7 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn
|
|||
|
||||
# create a new coinify invoice if needed
|
||||
if not hasattr(order, 'coinifyapiinvoice'):
|
||||
coinifyinvoice = create_coinify_invoice(order)
|
||||
coinifyinvoice = create_coinify_invoice(order, request)
|
||||
if not coinifyinvoice:
|
||||
messages.error(request, "There was a problem with the payment provider. Please try again later")
|
||||
return HttpResponseRedirect(reverse_lazy('shop:order_detail', kwargs={'pk': self.get_object().pk}))
|
||||
|
|
Loading…
Reference in a new issue