From 4586fb3645769b40e5f2e46fce53b3b94611cc97 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 13 Oct 2025 11:23:27 +0800 Subject: [PATCH] PayPal webhook PAYMENT.CAPTURE.REVERSED --- webht/third_party/paypal/controllers/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 43e1b6d0..0827936a 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -646,6 +646,7 @@ class Index extends CI_Controller { if ( strpos($post_data->event_type, 'COMPLETED') === false && strpos($post_data->event_type, 'REFUNDED') === false + && strpos($post_data->event_type, 'PAYMENT.CAPTURE.REVERSED') === false && strpos($post_data->event_type, 'PAYMENT.CAPTURE.DECLINED') === false && strpos($post_data->event_type, 'PAYMENT.SALE.REVERSED') === false && strpos($post_data->event_type, 'CHECKOUT.ORDER.APPROVED') === false @@ -764,7 +765,8 @@ class Index extends CI_Controller { $pn_receiver_account = $GAI_API->payee->email_address; $pn_receiver_account_name = $this->fundsource_map($pn_receiver_account)->merchant; break; - case 'PAYMENT.CAPTURE.REFUNDED': // todo: PAYMENT.CAPTURE.REVERSED + case 'PAYMENT.CAPTURE.REFUNDED': + case 'PAYMENT.CAPTURE.REVERSED': $fund_type = 'refund'; $pn_invoice = $post_data->resource->invoice_id; $pn_custom = $post_data->resource->custom_id;