Created
May 7, 2012 21:59
-
-
Save elialbert/2630770 to your computer and use it in GitHub Desktop.
paypal sandbox 500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def auth1(): | |
headers = {'X-PAYPAL-SECURITY-USERID':PAYPAL_API_USERNAME,'X-PAYPAL-SECURITY-PASSWORD':PAYPAL_API_PASSWORD,'X-PAYPAL-SECURITY-SIGNATURE':PAYPAL_API_SIGNATURE,'X-PAYPAL-APPLICATION-ID':'APP-80W284485P519543T','X-PAYPAL-REQUEST-DATA-FORMAT':'NV','X-PAYPAL-RESPONSE-DATA-FORMAT':'JSON'} | |
url = 'https://svcs.sandbox.paypal.com/Permissions/RequestPermissions' | |
payload="requestEnvelope.errorLanguage=en_US&scope=EXPRESS_CHECKOUT&callback=http://simplerelevance.com" | |
resp = requests.post(url,headers=headers,data=payload,config=m) | |
print resp.content | |
print resp.status_code |
I realized it should be at Permissions/RequestPermission - but that doesn't help at all.
ok, it should be RequestPermissions, so at least that part worked. My API credentials are still failing tho.
Also, 500 means server error, ya know? can you please throw a 404 if I get a complicated url wrong?
OK, finding more problems. Fixed the underscores in the header. Now I'm getting a 500000 error!
and... got it - step 1 is fixed. so finicky!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tried a post and a get... receiving a 500.