Reputation: 845
I'm trying to setup Django-Paypal and have got as far as the return from PayPal. To cut a long story short, in my Apache access logs, I get the following whenever I process a payment through PayPal (and PayPal POSTs the result back to my server):
173.0.82.126 - - [27/Oct/2012:16:42:52 +0200] "POST /my/super/secret/notify/url/ HTTP/1.0" 401 787 "-" "-"
The notify view does have @csrf_exempt
for the purpose of troubleshooting this error and still it doesn't work.
If anyone can tell me how to solve this issue (which is clearly a permissions/authorization issue), I'd be very grateful!
P.S.: I've tried adding WSGIPassAuthorization
on to my apache config file, which also didn't help.
Upvotes: 1
Views: 739
Reputation: 1168
I've Just hit the same issue but kept the basic authentication by adding a few 'Allow from' rules in the virtual host:
Allow from 173.0.82.77
Allow from 173.0.82.126
Allow from 173.0.82.78
Satisfy Any
Upvotes: 2
Reputation: 845
Turns out, I was being very dim.... We had Basic Authentication on the server to keep out prying eyes until launch, so of course PayPal was being rejected with a 401.....
So the answer of course is to remove the Basic Authentication while testing the IPN - all clear!
Amazing how stepping back from something for a bit reveals the most glaring (and simple) of mistakes.
Upvotes: 6