How to validate paymentID Express Checkout PHP
srinivastamada
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Sep-01-2017
09:01 AM
<?php $ch = curl_init('https://api.sandbox.paypal.com/v1/payments/payment/PAY-XXXXXXX'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' . $accessToken, 'Accept: application/json', 'Content-Type: application/xml' )); $result = curl_exec($ch); ?>
Response
{"name":"PERMISSION_DENIED","message":"No permission for the requested operation","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"8ab402e2b3366"}
1 REPLY 1
angelleye
Advisor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep-06-2017
06:40 PM
What are you passing for the $accessToken? Did you generate that before this snippet runs?
Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Error: "Unable to change shipping method. Please try again." in PayPal popup in REST APIs
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Url () is not a fully qualified URL in REST APIs
- Advanced Checkout Hosted Fields, Validate Form, "Subscribe to multiparty card field events", where?? in SDKs
- v2 REST API: paymentID not returned when redirect to website after payment approved in REST APIs