extra wallet settings
This commit is contained in:
@@ -175,6 +175,25 @@ class WrenchWallet extends BaseController
|
||||
return json_encode( $final_out );
|
||||
}
|
||||
|
||||
private function getSettings($settingkey, $defaultVal=''){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
$out=[];
|
||||
$endpoint = "SETTINGS";
|
||||
$out = $this->getCache($endpoint);
|
||||
if (!is_array($out) || count($out)==0 ) {
|
||||
$local_url = "http://".$this->micro_service_net1.":3037/settings";
|
||||
$out = $this->APIcall('GET', $local_url, $in);
|
||||
if (count($out['result_list']) > 0 ){ // dont cache empty
|
||||
$this->saveCache($endpoint,$out,55500);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($out) && count($out['result_list']) > 0 ) {
|
||||
return (isset($out['result_list'][$settingkey])) ? $out['result_list'][$settingkey]: $defaultVal;
|
||||
}
|
||||
return $defaultVal;
|
||||
}
|
||||
//getKidWallet from parent side
|
||||
public function getKidWallet(){
|
||||
log_message('critical', "0001");
|
||||
@@ -267,7 +286,7 @@ class WrenchWallet extends BaseController
|
||||
"transfer_limit" => 0,
|
||||
"wallet_uid" => "",
|
||||
"escrow" => 0,
|
||||
"status" => 1,
|
||||
"status" => $this->getSettings('ENABLE_EXTRA_WALLET', 0),
|
||||
"show_balance" => false,
|
||||
"rt_action_text" => "Add Card",
|
||||
"banner" => 'https://www.wrenchboard.com/assets/images/apps/wallet/wallet-card.jpg',
|
||||
@@ -288,7 +307,7 @@ class WrenchWallet extends BaseController
|
||||
"transfer_limit" => 0,
|
||||
"wallet_uid" => "",
|
||||
"escrow" => 0,
|
||||
"status" => 0,
|
||||
"status" => $this->getSettings('ENABLE_EXTRA_WALLET', 0),
|
||||
"show_balance" => true,
|
||||
"rt_action_text" => "View",
|
||||
"banner" => 'https://www.wrenchboard.com/assets/images/apps/wallet/wallet-token.jpg',
|
||||
@@ -309,7 +328,7 @@ class WrenchWallet extends BaseController
|
||||
"transfer_limit" => 0,
|
||||
"wallet_uid" => "",
|
||||
"escrow" => 0,
|
||||
"status" => 0,
|
||||
"status" => $this->getSettings('ENABLE_EXTRA_WALLET', 0),
|
||||
"show_balance" => true,
|
||||
"rt_action_text" => "Redeem",
|
||||
"banner" => 'https://www.wrenchboard.com/assets/images/apps/wallet/wallet-point.jpg',
|
||||
|
||||
Reference in New Issue
Block a user