Skip to content

Commit

Permalink
Merge pull request #102 from jarekmajcher/4.x
Browse files Browse the repository at this point in the history
Fix error 500 when ordering with offline payments
  • Loading branch information
loevgaard authored Sep 23, 2024
2 parents a8c38b6 + 099be00 commit 2b5b7a2
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 2b5b7a2

Please sign in to comment.