Skip to content

Commit

Permalink
Merge branch '0.8' into merge/merge-0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
repl6669 committed Dec 3, 2024
2 parents 337f583 + 006a83e commit e890b6d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Domain/Payments/Actions/MarkPendingPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ class MarkPendingPayment
*/
public function __invoke(OrderContract $order): OrderContract
{
$disabledStatuses = [
'payment-received',
'dispatched',
'delivered',
'cancelled',
'on-hold',
];

if (in_array($order->status, $disabledStatuses)) {
return $order;
}

$order = (new ChangeOrderStatus)($order, OrderStatus::PENDING_PAYMENT);

return $order;
Expand Down

0 comments on commit e890b6d

Please sign in to comment.