fix unpaid expired check

This commit is contained in:
iBNu Maksum
2024-10-17 13:14:53 +07:00
parent a7232e2b92
commit 97296abf06
2 changed files with 10 additions and 2 deletions

View File

@ -333,7 +333,7 @@ $unpaid = ORM::for_table('tbl_payment_gateway')
->find_one();
// check expired payments
if(strtotime($unpaid['expired_date']) < time() || strtotime($unpaid['created_date'], "+24 HOUR") < time()){
if($unpaid && (strtotime($unpaid['expired_date']) < time() || strtotime($unpaid['created_date'], "+24 HOUR") < time())){
$unpaid->status = 4;
$unpaid->save();
$unpaid = [];