extra wallets
This commit is contained in:
@@ -232,12 +232,15 @@ class WrenchWallet extends BaseController
|
|||||||
$this->saveCache($endpoint,$out,1500);
|
$this->saveCache($endpoint,$out,1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wallet_country = $first_names = array_column($out['result_list'], 'country');;
|
if ( count($out["result_list"][])> 0 ){
|
||||||
$auxWallet = $this->auxiliaryWallets($wallet_country);
|
$owner_country = $out["result_list"][0]['owner_country'];
|
||||||
|
$wallet_country = $first_names = array_column($owner_country , 'country');;
|
||||||
|
$auxWallet = $this->auxiliaryWallets($wallet_country);
|
||||||
|
foreach ($auxWallet as $item){
|
||||||
|
$out["result_list"][] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($auxWallet as $item){
|
|
||||||
$out["result_list"][] = $item;
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
$out["result_list"][] = [
|
$out["result_list"][] = [
|
||||||
"wallet_country" => ['US'],
|
"wallet_country" => ['US'],
|
||||||
@@ -305,8 +308,7 @@ class WrenchWallet extends BaseController
|
|||||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function auxiliaryWallets($wallet_country): array {
|
private function auxiliaryWallets( $owner_country ): array {
|
||||||
|
|
||||||
$auxWallet = [
|
$auxWallet = [
|
||||||
[
|
[
|
||||||
"wallet_country" => ['US'],
|
"wallet_country" => ['US'],
|
||||||
@@ -372,7 +374,7 @@ class WrenchWallet extends BaseController
|
|||||||
|
|
||||||
$retArr=[];
|
$retArr=[];
|
||||||
foreach ( $auxWallet as $item){
|
foreach ( $auxWallet as $item){
|
||||||
if ( in_array( $item['owner_country'], $item['wallet_country']) ){
|
if ( in_array( $owner_country, $item['wallet_country']) ){
|
||||||
log_message('critical', "***** ***** auxiliaryWallets::ITEM ". serialize($item));
|
log_message('critical', "***** ***** auxiliaryWallets::ITEM ". serialize($item));
|
||||||
$retArr[] =$item;
|
$retArr[] =$item;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user