Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forwarding the original PayPal error message #101

Merged
merged 2 commits into from
Nov 4, 2015

Conversation

phedoreanu
Copy link
Contributor

Simple fix for displaying PayPal's original error message to the user.

Also included naming parameters - django-oscar 1.1 compatible.

@phedoreanu phedoreanu force-pushed the master branch 2 times, most recently from 3765923 to 9ae6a92 Compare June 28, 2015 00:38
ERROR Internal Server Error: /en/checkout/paypal/preview/5/
Traceback (most recent call last):
  File "/virtenvs/test/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/checkout/session.py", line 68, in dispatch
    request, *args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/paypal/express/views.py", line 200, in get
    kwargs['basket'] = self.load_frozen_basket(kwargs['basket_id'])
  File "/virtenvs/test/lib/python2.7/site-packages/paypal/express/views.py", line 231, in load_frozen_basket
    Applicator().apply(self.request, basket)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/offer/applicator.py", line 26, in apply
    offers = self.get_offers(basket, user, request)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/offer/applicator.py", line 58, in get_offers
    basket_offers = self.get_basket_offers(basket, user)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/offer/applicator.py", line 94, in get_basket_offers
    if not basket.id or not user:
AttributeError: 'WSGIRequest' object has no attribute 'id'
@maiksprenger
Copy link
Member

That's two lovely fixes in one, thanks!

maiksprenger added a commit that referenced this pull request Nov 4, 2015
forwarding the original PayPal error message
@maiksprenger maiksprenger merged commit 9c8b3e5 into django-oscar:master Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants