hi,

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 173.0.82.126 - - [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

xpanta
62123
accept rate: 0%


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

link

answered 21 Mar '12, 01:07

johns's gravatar image

johns ♦♦
4.1k28
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

By RSS:

Answers

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

Tags:

×743
×171
×5

Asked: 21 Mar '12, 00:56

Seen: 1,256 times

Last updated: 21 Mar '12, 01:44

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited