https://developer.paypal.com/docs/checkout/apm/reference/subscribe-to-webhooks

https://developer.paypal.com/docs/checkout/apm/reference/handle-uncaptured-payments/

Dianjiang客户遇到的问题MTS那边查出来了。买家确实通过Ideal付款了,但是可能付款后直接关闭窗口,导致Dianjiang那边没有获取approval的信息,3小时以后自动退款了。需要让Dianjiang那边多订阅两个webhooks,如果收到approval的WH,也可以进行capture

之后单独做APM按钮的话,这两个点也是需要做的

https://developer.paypal.com/docs/checkout/apm/ideal/#link-knowbeforeyoucode  不知道是不是有什么特别的问题

另外MTS还给了另外一个解决思路:


Also, Pass "processing_instruction" : "ORDER_COMPLETE_ON_PAYMENT_APPROVAL" in Create Order API call to automatically capture the payment as soon as it gets approved by the buyers/customers. This option is only available for the following payment_source: Alipay, Bancontact, BLIK, boletobancario, eps, giropay,  GrabPay, iDEAL, Multibanco, MyBank, OXXO, P24, PayU, PUI, SafetyPay, SatisPay, Sofort, Trustly, Verkkopankki, WeChat Pay



Please make sure that you're subscribed to the following webhook events:

- CHECKOUT.ORDER.APPROVED - Listen for this webhook and then capture the payment.
- CHECKOUT.PAYMENT-APPROVAL.REVERSED - Listen for this webhook as an indication that an approved order wasn't captured within the capture window resulting in a cancellation of the order and a refund to the buyer's account. Then notify your buyer of the problem and the reversed order.

"processing_instruction" : "ORDER_COMPLETE_ON_PAYMENT_APPROVAL"  要同时指定payment_source是ideal,而且只能跟srandalone button一起用,确实不用capture会自动执行capture