REST API V2 to approve/execute payment with the buyer test account?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I can't find this info on the PayPal docs. I am currently creating an order with the 'https://api.sandbox.paypal.com/v2/checkout/orders' request. Then the order stays at the 'CREATED' status. How can I approve the request at the sandbox buyer side without having to manually log in into the buyer in a browser? In other words, how can I execute a HTTP request (say with cURL) to change my test order to the 'APPROVED' status?
Thanks in advance
- Labels:
-
Payments REST APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ViVa-Kakele
PayPal attempts to emulate Production as closely as possible with sandbox operations. Because of this, there is no way to bypass a user logging in and approving an order so far as I know. Not only is this good for consistency across live and sandbox, but also for the security of PayPal, Merchants, and their Buyers so that internal processes aren't revealed to those testing these transactions.
It's purely so that testing in sandbox can be as close to the real thing as possible.
I hope this helps.
-Aaron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Aaron!
That is unfortunate. I still think that exposing 'test API' calls would be beneficial for developers, specially for programmatically executing buyer side actions. I am not sure I understand the security risk that exists in the sandbox, as it is supposed to be a test environment. The API docs right now don't mention anything about this limitation either.
It is hard to write an integration test with the current API, which many could benefit to keep their apps healthy (I don't want my app to break and my payments to not work!). I have created an alternative using Python and Selenium to execute the payment in the SandBox. If you think that is OK I can share it on GitHub publicly for others that need this as well.
Best regards
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Add Others data in SDKs
- Get error message "Someting went wrong" when the sandbox account tap "Agree and Connect" button. in Sandbox Environment
- can we assign a unique detail to every subscription creation? in NVP/SOAP APIs
- Button in PayPal Payments Standard
- Need help to integrate Advanced Checkout (PPCP) With WHMCS in PayPal Upgrade Community