Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Dec 10, 2024
1 parent 33e26a8 commit ff2612c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Gateway/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getFailureUrl(Order $order): string
/**
* Handle the checkout request.
*/
public function handleCheckout(Request $request, Order $order): Response
public function x(Request $request, Order $order): Response
{
try {
$this->checkout($request, $order);
Expand All @@ -107,7 +107,7 @@ public function handleCheckout(Request $request, Order $order): Response
*/
public function checkout(Request $request, Order $order): Order
{
$order->markAs(Order::ON_HOLD);
$order->markAs(Order::PENDING);

return $order;
}
Expand Down Expand Up @@ -169,7 +169,7 @@ public function capture(Request $request, Order $order): Order
{
$this->pay($order);

$order->markAs(Order::PENDING);
$order->markAs(Order::ON_HOLD);

return $order;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public function partiallyPaid(): bool
*/
public function payable(): bool
{
return in_array($this->status, [static::ON_HOLD, static::CANCELLED])
return in_array($this->status, [static::ON_HOLD, static::PENDING, static::CANCELLED])
&& $this->getTotalPayable() > 0
&& ! $this->paid();
}
Expand Down

0 comments on commit ff2612c

Please sign in to comment.