Paypal Checkout Express - OnApprove doesn't return the promise but captures the payment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I have been having strange issues with Paypal Express Checkout.
Every time a payment is trying to be made, the function "onApprove" is called as it is supposed to be.
However from time to time (after sending the EXACT same information without changing the code),
return actions.order.capture().then(function (details) { // MY CODE
is never called, even though the capture is well made (I get a success HTTP response with the capture results, and I can see the order in my paypal account).
I do catch errors with OnError and I don't get any in those cases either.
Why isn't the promise returned?
Thank you for the help,
Fiona
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the REST SDK v2, but my solution might help you.
I just posted all my code that might help you with the onApprove issue you're having.
This is my post: https://www.paypal-community.com/t5/SDKs/MY-WORKING-SOLUTION-for-full-v2-SDK-script-with-onError-onC...

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Compliance violation. flag based on the account origin ? in Sandbox Environment
- PayPal integration with Next, Lambda and API Gateway - 400 Invalid Request in Sandbox Environment
- paypal angular sandbox, receiving not approved order ,when Capture even OnApprove is triggered in Sandbox Environment
- How do I handle INSTRUMENT_DECLINED error? in REST APIs
- paypal_js_sdk_v5_unhandled_exception {err: 'Error: No ack for postMessage init() in SDKs