Authentication failed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would be very thankful, if somebodey could help me with my problem.
authentication works for setup payment, but not in GET and not in PATCH call (update payment)
in STEP 1 I SETUP an new payment using auth-code
it works: in STEP 2 i received response with payment-ID: PAY-0CD79303U7219253CLQ7AEPQ
in STEP 3, I try ro read payment-information.. I use url/payment-id/
and the same auth-code, which I used in STEP 1
in STEP 4, i receive response : AUTHENTICATION_FAILURE ????
same problem, when I try to UPDATE payment resource by PATCH call
Thanks a lot for help
STEP 1
curl -v https://api.sandbox.paypal.com/v1/payments/payment \ -H ‚Content-Type: application/json‘ \ -H ‚Authorization: Bearer A21AAGDSFmBgCGMhUOnMb5eEtXhpPe1fflt2irBV6-nRiQHmpbOwqyQKacpoGrhkHFYm0RO-KbGO_I0Ok9tbjMoOTulEeYy-g‘ \ -d ‚{ „intent“:“sale“, „redirect_urls“:{ „return_url“:“https://www.pad.astro-expert.de/ppplus/“, „cancel_url“:“https://www.pad.astro-expert.de/ppplus/“ }, „payer“:{ „payment_method“:“paypal“ }, „transactions“:[ { „amount“:{ „total“:“0.40″, „currency“:“EUR“ } } ] } }‘
STEP 2
Array ( [id] => PAY-0CD79303U7219253CLQ7AEPQ [intent] => sale [state] => created [payer] => Array ( [payment_method] => paypal ) [transactions] => Array ( [0] => Array ( [amount] => Array ( [total] => 0.40 [currency] => EUR ) [related_resources] => Array ( ) ) ) [create_time] => 2019-01-15T15:54:38Z [links] => Array ( [0] => Array ( [href] => https://api.sandbox.paypal.com/v1/payments/payment/PAY-0CD79303U7219253CLQ7AEPQ [rel] => self [method] => GET ) [1] => Array ( [href] => https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-0RS06289WF972680N [rel] => approval_url [method] => REDIRECT ) [2] => Array ( [href] => https://api.sandbox.paypal.com/v1/payments/payment/PAY-0CD79303U7219253CLQ7AEPQ/execute [rel] => execute [method] => POST ) ) )
STEP 3
curl -v -X GET https://api.sandbox.paypal.com/v1/payments/payment/PAY-0CD79303U7219253CLQ7AEPQ \ -H ‚Content-Type: application/json‘ \ -H ‚Authorization: Bearer A21AAGDSFmBgCGMhUOnMb5eEtXhpPe1fflt2irBV6-nRiQHmpbOwqyQKacpoGrhkHFYm0RO-KbGO_I0Ok9tbjMoOTulEeYy-g‘
STEP 4
Array ( [name] => AUTHENTICATION_FAILURE [message] => Authentication failed due to invalid authentication credentials or a missing Authorization header. [links] => Array ( [0] => Array ( [href] => https://developer.paypal.com/docs/api/overview/#error [rel] => information_link ) ) )
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Using Paypal Smart Buttons for checkout sometimes fails with Debit/ Credit Cards Form in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Sandbox account not generating IPNs in Sandbox Environment
- link my PayPal business account with my WordPress website , but it's not work ?! in PayPal Payments Standard
- Change the button from Sandbox to Production in REST APIs
- I met the 422 response, and tries a lot solutions in the community but still not work in REST APIs