Skip to content

Commit

Permalink
Add STATE_AWAITING_PAYMENT to isEligible()
Browse files Browse the repository at this point in the history
  • Loading branch information
jarekmajcher authored Sep 18, 2024
1 parent a8c38b6 commit 099be00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Message/Handler/SendPurchaseEventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ public function __invoke(SendPurchaseEvent $message): void

protected function isEligible(OrderInterface $order): bool
{
return in_array($order->getPaymentState(), [OrderPaymentStates::STATE_AUTHORIZED, OrderPaymentStates::STATE_PAID], true) && $order->getCheckoutState() === OrderCheckoutStates::STATE_COMPLETED;
return in_array($order->getPaymentState(), [OrderPaymentStates::STATE_AUTHORIZED, OrderPaymentStates::STATE_PAID, OrderPaymentStates::STATE_AWAITING_PAYMENT], true) && $order->getCheckoutState() === OrderCheckoutStates::STATE_COMPLETED;
}
}

0 comments on commit 099be00

Please sign in to comment.