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?
2
Answers
A decline is one possible scenario.
Reaching an order review page and not clicking on the final action that triggers the capture, is another.
Those are both normal events and not indicative of any problem.
Theoretically some type of technical error could also interrupt the process and contribute to this type of drop off, but that is not likely unless you receive specific reports of an issue.
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 wasAPPROVED
, but no money was ever transferred.The issue was that you don’t replace the
onApprove
function, rather, theonApprove
function still needs to callactions.order.capture()
. This method will then transfer the money, and mark the order asCOMPLETED
.