From 51a90e97bc7c56cd74593f00c64e143ce52bbce5 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Mon, 11 Jan 2016 00:46:06 +0100 Subject: [PATCH] Grab basket object from build_submission(), not from request When the RedirectView is used in combination with another CheckoutSessionMixin defined for a DeferredTax taxation strategy, then submission's basket object has critical tax information, whereas request.basket does not. Change RedirectView's basket reference to point to build_submission()['basket']. Fixes django-oscar/django-oscar-paypal#98, reported by Nigel Fletton. --- paypal/express/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paypal/express/views.py b/paypal/express/views.py index 3a62aeee..67f19608 100644 --- a/paypal/express/views.py +++ b/paypal/express/views.py @@ -61,7 +61,7 @@ class RedirectView(CheckoutSessionMixin, RedirectView): def get_redirect_url(self, **kwargs): try: - basket = self.request.basket + basket = self.build_submission()['basket'] url = self._get_redirect_url(basket, **kwargs) except PayPalError as ppe: messages.error(