From f27dc87ed12f08d897238a5067740a92330cc111 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Fri, 28 Jun 2024 14:12:02 +0200 Subject: [PATCH 1/2] Bail CapturePayment if is not mollie payment --- src/MerchantCapture/Capture/Action/CapturePayment.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MerchantCapture/Capture/Action/CapturePayment.php b/src/MerchantCapture/Capture/Action/CapturePayment.php index 41fd5ab7..983fd452 100644 --- a/src/MerchantCapture/Capture/Action/CapturePayment.php +++ b/src/MerchantCapture/Capture/Action/CapturePayment.php @@ -13,6 +13,11 @@ class CapturePayment extends AbstractPaymentCaptureAction public function __invoke() { try { + $payment = $this->order->get_payment_method(); + if (strpos($payment, 'mollie') === false ) { + return; + } + $paymentId = $this->order->get_meta('_mollie_payment_id'); if (!$paymentId) { From 2f2276ad1d4de0067e385ec4a96e9850dbf8c3b2 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Wed, 3 Jul 2024 08:44:45 +0200 Subject: [PATCH 2/2] Fix CS --- src/MerchantCapture/Capture/Action/CapturePayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MerchantCapture/Capture/Action/CapturePayment.php b/src/MerchantCapture/Capture/Action/CapturePayment.php index 983fd452..8d50f699 100644 --- a/src/MerchantCapture/Capture/Action/CapturePayment.php +++ b/src/MerchantCapture/Capture/Action/CapturePayment.php @@ -14,7 +14,7 @@ public function __invoke() { try { $payment = $this->order->get_payment_method(); - if (strpos($payment, 'mollie') === false ) { + if (strpos($payment, 'mollie') === false) { return; }