Hey, I'm facing some problem like this: im trying to integrate paypal payments in my website through server side request. server is written in python and the flow goes like this: 1. asking for token with client_id and client_secret 'https://api.sandbox.paypal.com/v1/oauth2/token' 2. create payment request "https://api.sandbox.paypal.com/v1/payments/payment/" with the given token and redirect the client to the approval page with the given url - {
"href": "https://api.sandbox.paypal.com/v1/payments//cgi-bin/webscr?cmd=_express-checkout&token=EC-60385559L1062554J",
"rel": "approval_url",
"method": "REDIRECT"
}, from the last respone (came back from create payment request). 3. now the shown page on the client side is paypal payments page, the client click the button to approve the payment, send request to the server to execute new request. on the server side im executing this request: url = "https://api.paypal.com/v1/payments/payment/" +paymentId+ "/execute" headers = { 'Content-Type': 'application/json', "Authorization": "Bearer" + " " + accessToken, } dataPayment ={ "payer_id":payerId } and now i'm facing a problem: im always getting this response status 401 '{"error":"invalid_token","error_description":"The token passed in was not found in the system"}' i tried using the token from the first request, i tried making another token request before make "execute" request, but im facing the same error over and over. I'll appreciate your help, thanks in advance.
... View more