I have implemented django-paypal (PDT) with success. Meaning that user is transferred to paypal's site, pays, and comes back to mine for a 'thank you' message.

However payment notification url from paypal is turned down with a 401 error.

1208 - - [20/Mar/2012:08:20:16 -0500] "POST /hard-to-guess-string/pdt/ HTTP/1.0" 401 401 "-" "-"

django-paypal app, expects a GET request. So it might be a problem with my paypal settings (although i have checked them, so maybe paypal changed its policy to send a POST notification instead of GET). I also modified the view to expect a POST request. Still the same. The request is rejected.

Something notable is that when I send this request from my PC (using a dummy html form), the request is handled normally.

Is there a way to see why this request is answered with a 401?

asked 21 Mar '12, 00:56

xpanta's gravatar image

accept rate: 0%

Enable debugging and use the Django Debug Toolbar to get more info from the app.

permanent link

answered 21 Mar '12, 01:07

johns's gravatar image

johns ♦♦
accept rate: 23%

Thank you. I can do that, but the request comes from sandbox.paypal.com. Not me. Will I be able to debug a request that comes from another site in the django toolbar that I view on my pc?

(21 Mar '12, 01:19) xpanta xpanta's gravatar image

You might need to add logging to the view to get incoming info. A 401 has to do with authentication, so keep that in mind when looking for the problem, that something is failing authentication.

(21 Mar '12, 01:44) johns ♦♦ johns's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 Mar '12, 00:56

question was seen: 1,785 times

last updated: 21 Mar '12, 01:44

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited