Skip to content

Commit

Permalink
Fix #53 - cancel an empty payment
Browse files Browse the repository at this point in the history
  • Loading branch information
cbastienbaron committed Jun 3, 2024
1 parent 7ee8088 commit 571ac11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CommandHandler/CancelPaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public function __invoke(CancelPayment $command): void
return;
}

if (empty($payment->getDetails())) {

Check failure on line 38 in src/CommandHandler/CancelPaymentHandler.php

View workflow job for this annotation

GitHub Actions / Static checks (PHP 8.1, Symfony ^5.4)

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 38 in src/CommandHandler/CancelPaymentHandler.php

View workflow job for this annotation

GitHub Actions / Static checks (PHP 8.1, Symfony ^6.0)

Construct empty() is not allowed. Use more strict comparison.
return;
}

$gatewayName = $this->getGatewayNameFromPayment($payment);

if (null === $gatewayName) {
Expand Down

0 comments on commit 571ac11

Please sign in to comment.