Skip to content

Instantly share code, notes, and snippets.

@elialbert
Created May 7, 2012 21:59
Show Gist options
  • Save elialbert/2630770 to your computer and use it in GitHub Desktop.
Save elialbert/2630770 to your computer and use it in GitHub Desktop.
paypal sandbox 500
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
@elialbert
Copy link
Author

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?

@elialbert
Copy link
Author

OK, finding more problems. Fixed the underscores in the header. Now I'm getting a 500000 error!

@elialbert
Copy link
Author

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