Skip to content

Commit

Permalink
Fix already canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed Jan 2, 2024
1 parent 3a84831 commit fdc1420
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Action/CancelAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public function execute($request): void
return;
}

if (PaymentIntent::STATUS_CANCELED === $paymentIntent->status) {
return;

Check warning on line 30 in src/Action/CancelAction.php

View check run for this annotation

Codecov / codecov/patch

src/Action/CancelAction.php#L30

Added line #L30 was not covered by tests
}

$cancelRequest = new CancelPaymentIntent($paymentIntent->id);
$this->gateway->execute($cancelRequest);

Expand Down

0 comments on commit fdc1420

Please sign in to comment.