开发者

Django / Sagepay error

开发者 https://www.devze.com 2022-12-13 03:49 出处:网络
I am currentl开发者_高级运维y working on a bespoke e commerce Django project. The site works fine right up until the part when it passes the card details to Sagepay for processing and then it throws a

I am currentl开发者_高级运维y working on a bespoke e commerce Django project. The site works fine right up until the part when it passes the card details to Sagepay for processing and then it throws a 500 error and emails me the following:

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 92, in get_response
   response = callback(request, *callback_args, **callback_kwargs)
File "/var/www/*sitename*.com/src/cloudnine/shop/views.py", line 113, in payment payment_processor.do_request(payment_form, basket, request)
File "/var/www/*sitename*.com/src/cloudnine/shop/payment_processors/protx.py", line 170, in do_request
BillingAddress1 = billing_address.line1,
AttributeError: 'NoneType' object has no attribute 'line1'

We have a version of the site running on our development server which runs great.


This line of your Python traceback says what your problem is:

BillingAddress1 = billing_address.line1,
AttributeError: 'NoneType' object has no attribute 'line1'

So, billing_address is None, not set to some text input from the user: are you validating the data to make sure the billing address is filled in?

If so, then you have some other error along the code (like not reading the billing_address from the DB).


Fantastic - that little prompt was all I needed. I didn't have the dbs structurally sync'd. Thank you for your help and your speedy response.

0

精彩评论

暂无评论...
验证码 换一张
取 消