From fdc1420c88ce70d74973fb74c2a87bce66daae35 Mon Sep 17 00:00:00 2001 From: Francis Hilaire Date: Tue, 2 Jan 2024 11:03:19 +0100 Subject: [PATCH] Fix already canceled --- src/Action/CancelAction.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Action/CancelAction.php b/src/Action/CancelAction.php index 8931fa6..d8d6a10 100644 --- a/src/Action/CancelAction.php +++ b/src/Action/CancelAction.php @@ -26,6 +26,10 @@ public function execute($request): void return; } + if (PaymentIntent::STATUS_CANCELED === $paymentIntent->status) { + return; + } + $cancelRequest = new CancelPaymentIntent($paymentIntent->id); $this->gateway->execute($cancelRequest);