Skip to content

Commit

Permalink
Added order status check before fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
L3RAZ committed Oct 30, 2024
1 parent 3999f9e commit 5e0341f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function handle(GetPayPalOrderForCheckoutCompletedQuery $getPayPalOrderQu
/** @var array{id: string, status: string} $order */
$order = $this->orderPayPalCache->get($getPayPalOrderQuery->getOrderPayPalId()->getValue());

if (!empty($order) && !in_array($order['status'], ['APPROVED', 'COMPLETED'])) {
if (!empty($order) && in_array($order['status'], ['COMPLETED', 'CANCELED'])) {
return new GetPayPalOrderForCheckoutCompletedQueryResult($order);
}

Expand Down

0 comments on commit 5e0341f

Please sign in to comment.