39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use App\Core\Model;
|
|
|
|
class Disbursement extends Model {
|
|
protected static $table = 'disbursements';
|
|
|
|
public static function findActive() {
|
|
return self::builder()->where('status', 'active')->get();
|
|
}
|
|
|
|
public static function varifyTransaction($transaction_id, $reference_number){
|
|
|
|
$transaction = self::builder()->where('transaction_id', $transaction_id)
|
|
->where('infotech_transaction_id', $reference_number)
|
|
->get();
|
|
if ($transaction == false) {
|
|
// code...
|
|
return false;
|
|
}
|
|
return $transaction;
|
|
}
|
|
public static function updateTransaction($id, $params){
|
|
|
|
$transaction = self::builder()->where('transaction_id', $transaction_id)
|
|
->where('infotech_transaction_id', $reference_number)
|
|
->get();
|
|
if ($transaction == false) {
|
|
// code...
|
|
return false;
|
|
}
|
|
return $transaction;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
?>
|