python - X-PAYPAL-APPLICATION-ID error -


i'm writing application utilizes paypal's permissions api. i'm working on sandbox. verification code correctly when try getaccesstoken, error:

{"responseenvelope":{"timestamp":"2013-09-03t08:32:16.580-07:00","ack":"failure","correlationid":"3527b7033f20f","build":"2210301"},"error":[{"errorid":"560022","domain":"platform","subdomain":"application","severity":"error","category":"application","message":"the x-paypal-application-id header contains invalid value","parameter":["x-paypal-application-id"]}]} 

i'm using sandbox app_id , verification code gotten dynamically. here code fragment.

token = "aaaaaaayaratsvjvkubt" verification = "mgnnwdvffmgaes0q371hug" headers2 = { "x-paypal-security-userid": settings.username, "x-paypal-security-password": settings.password, "x-paypal-security-signature": settings.signature, "x-paypal-request-data-format": "json", "x-paypal-response-data-format": "json", "x-paypal-application-id": "app-80w284485p519543t", } url = "https://svcs.paypal.com/permissions/getaccesstoken/?token=%s&verifier=%s" %(token, verification) dat2 = {"requestenvelope": {"errorlanguage":"en_us"}} req2 = urllib2.request(url, simplejson.dumps(dat2), headers2) res2 = urllib2.urlopen(req2).read()   

what i'm doing wrong??

you cannot use sandbox application id on live environment. see https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/goinglive/#register learn how obtain live application id.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -