Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paypal - CHECKOUT.ORDER.APPROVED but no PAYMENT.CAPTURE.COMPLETED

Tags:

paypal

I'm using Paypal Orders API (v2) on a website and multiple times there has been an approved order that are missing captures complete.

I get this event for all orders:

CHECKOUT.ORDER.APPROVED

But for some orders, this event does not occur:

PAYMENT.CAPTURE.COMPLETED

How does this happen, is it because a customers credit card got declined?

like image 694
Tompina Avatar asked Oct 16 '25 18:10

Tompina


1 Answers

Make sure the actions.order.capture() function is being called properly.

I had the issue where I wanted my server to validate the payment was successful. So, I replaced the onApprove function, with a call to my server. When my server requested the order, it always said it was APPROVED, but no money was ever transferred.

The issue was that you don't replace the onApprove function, rather, the onApprove function still needs to call actions.order.capture(). This method will then transfer the money, and mark the order as COMPLETED.

like image 125
Craigo Avatar answered Oct 19 '25 14:10

Craigo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!