Skip to content

Commit

Permalink
Grab basket object from build_submission(), not from request
Browse files Browse the repository at this point in the history
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 #98, reported by Nigel Fletton.
  • Loading branch information
fghaas committed Jan 12, 2016
1 parent baf82b1 commit 51a90e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paypal/express/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 51a90e9

Please sign in to comment.