From 3010033b751fb3c48d78509a94241b046ad37920 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Mon, 19 Jun 2017 23:52:01 +0200 Subject: [PATCH] pass request to create_coinify_invoice() --- src/shop/coinify.py | 2 +- src/shop/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shop/coinify.py b/src/shop/coinify.py index ecc29a3e..a605a348 100644 --- a/src/shop/coinify.py +++ b/src/shop/coinify.py @@ -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), diff --git a/src/shop/views.py b/src/shop/views.py index be4b9c01..4e9a9cb7 100644 --- a/src/shop/views.py +++ b/src/shop/views.py @@ -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}))