Skip to content

Commit

Permalink
expire Transaction method
Browse files Browse the repository at this point in the history
  • Loading branch information
shaxzodbek-uzb authored Jun 4, 2024
1 parent 3371709 commit 616f6e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function cancel($reason)

public function isExpired()
{
return $this->state == self::STATE_CREATED && DataFormat::datetime2timestamp($this->updated_time) - time() > self::TIMEOUT;
return ($this->state == self::STATE_CREATED) && ($this->updated_at < now()->subHours(12));
}

public function transactionable(): MorphTo
Expand Down

0 comments on commit 616f6e0

Please sign in to comment.