From e4ea1c856492104c0df7517fb82930bfc129dc4f Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 27 Oct 2024 16:24:42 -0400 Subject: [PATCH] Adding wallets models --- www-api/app/Controllers/WrenchWallet.php | 45 +++++++++++++----------- www-api/app/Models/WrenchWalletModel.php | 35 ++++++++++++++++++ 2 files changed, 60 insertions(+), 20 deletions(-) create mode 100644 www-api/app/Models/WrenchWalletModel.php diff --git a/www-api/app/Controllers/WrenchWallet.php b/www-api/app/Controllers/WrenchWallet.php index f1e23488..e6be52b5 100644 --- a/www-api/app/Controllers/WrenchWallet.php +++ b/www-api/app/Controllers/WrenchWallet.php @@ -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); diff --git a/www-api/app/Models/WrenchWalletModel.php b/www-api/app/Models/WrenchWalletModel.php new file mode 100644 index 00000000..be73c903 --- /dev/null +++ b/www-api/app/Models/WrenchWalletModel.php @@ -0,0 +1,35 @@ + 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' + ]; + } + + + +} \ No newline at end of file