2

尝试将Django-Oscar-Paypal与我的项目集成。我正在使用 Paypal 快递版本。结帐时,流程将转到 Paypal 的网站。但是,当 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找不到。我能做些什么来解决这个问题?

4

0 回答 0