' WSGIRequest'对象没有属性' id' - Django Oscar Paypal?

时间:2015-10-05 07:18:11

标签: django paypal django-oscar

尝试将Django-Oscar-Paypal与我的项目集成。我使用的是Paypal快递版。在结账时,流程将进入Pay​​pal的网站。但是当Paypal重定向回我的网站时,我收到以下错误。

AttributeError at /checkout/paypal/preview/16/
'WSGIRequest' object has no attribute 'id'
Request Method: GET
Request URL:    http://localhost:8000/checkout/paypal/preview/16/?token=EC-9JB96808VX198132S&PayerID=TYNFGLXS46S2E
Django Version: 1.8.3
Exception Type: AttributeError
Exception Value:    
'WSGIRequest' object has no attribute 'id'
Exception Location: /Users/nikhilsingh/djangoOscarEnv/lib/python2.7/site-packages/oscar/apps/offer/applicator.py in get_basket_offers, line 93
Python Executable:  /Users/nikhilsingh/djangoOscarEnv/bin/python
Python Version: 2.7.6
Python Path:    
['/Users/nikhilsingh/teabox_new/teashop',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python27.zip',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/plat-darwin',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/plat-mac',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Users/nikhilsingh/djangoOscarEnv/Extras/lib/python',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/lib-tk',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/lib-old',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/lib-dynload',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Users/nikhilsingh/djangoOscarEnv/lib/python2.7/site-packages']
Server time:    Mon, 5 Oct 2015 07:10:10 +0000

看起来篮子在重定向时变空,因此找不到id。我该怎么做才能解决这个问题?

0 个答案:

没有答案