Initial commit
This commit is contained in:
39
app/Models/Disbursement.php
Normal file
39
app/Models/Disbursement.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user