Paypal Checkout Express - OnApprove doesn't return the promise but captures the payment

Hisaeri
Contributor
Contributor

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

Login to Me Too
1 REPLY 1

matthewperosi
Contributor
Contributor

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...

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.