Adding wallets models

This commit is contained in:
CHIEFSOFT\ameye
2024-10-27 16:24:42 -04:00
parent 1e7159890f
commit e4ea1c8564
2 changed files with 60 additions and 20 deletions
+25 -20
View File
@@ -6,12 +6,15 @@ use CodeIgniter\API\ResponseTrait;
class WrenchWallet extends BaseController
{
protected \App\Models\WrenchWalletModel $wrenchWalletModel;
use ResponseTrait;
public function __construct()
{
log_message('critical', "WrenchWallet Path GATE 001");
$this->request = $request = \Config\Services::request();
$this->wrenchWalletModel = new \App\Models\WrenchWalletModel();
}
@@ -216,27 +219,29 @@ class WrenchWallet extends BaseController
$this->saveCache($endpoint,$out,1500);
}
}
$extraWallet = $this->wrenchWalletModel->kidsExtraWallet();
$out["result_list"][] = [
"amount" => 0,
"id" => 1,
"code" => "USD",
"description" => "Add Virtual Debit Card",
"symbol" => "$",
"action_type" => "AC_AD_VIRTUAL_CARD",
"lorder" => 0,
"country" => "",
"processor" => 9010,
"current_balance" => 0,
"transfer_limit" => 0,
"wallet_uid" => "",
"escrow" => 0,
"status" => 1,
"show_balance" => false,
"rt_action_text" => "Add Card",
"banner" => 'https://www.wrenchboard.com/assets/images/apps/wallet/wallet-card.jpg',
"icon" => 'https://www.wrenchboard.com/assets/images/apps/wallet/icon/cards.png'
];
$out["result_list"][] = $extraWallet;
// [
// "amount" => 0,
// "id" => 1,
// "code" => "USD",
// "description" => "Add Virtual Debit Card",
// "symbol" => "$",
// "action_type" => "AC_AD_VIRTUAL_CARD",
// "lorder" => 0,
// "country" => "",
// "processor" => 9010,
// "current_balance" => 0,
// "transfer_limit" => 0,
// "wallet_uid" => "",
// "escrow" => 0,
// "status" => 1,
// "show_balance" => false,
// "rt_action_text" => "Add Card",
// "banner" => 'https://www.wrenchboard.com/assets/images/apps/wallet/wallet-card.jpg',
// "icon" => 'https://www.wrenchboard.com/assets/images/apps/wallet/icon/cards.png'
// ];
/* */
$out["wallet_cards"] = [];
return $this->respond( $this->summaryReturnData($in,$out), 200);
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class WrenchWalletModel extends Model
{
public function kidsExtraWallet(){
return [
"amount" => 0,
"id" => 1,
"code" => "USD",
"description" => "Add Virtual Debit Card",
"symbol" => "$",
"action_type" => "AC_AD_VIRTUAL_CARD",
"lorder" => 0,
"country" => "",
"processor" => 9010,
"current_balance" => 0,
"transfer_limit" => 0,
"wallet_uid" => "",
"escrow" => 0,
"status" => 1,
"show_balance" => false,
"rt_action_text" => "Add Card",
"banner" => 'https://www.wrenchboard.com/assets/images/apps/wallet/wallet-card.jpg',
"icon" => 'https://www.wrenchboard.com/assets/images/apps/wallet/icon/cards.png'
];
}
}