From 10149affc37c93b0feca3a41365dba95e583bb2d Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 31 Oct 2024 17:10:31 -0400 Subject: [PATCH] card_assigned --- www-api/app/Config/Constants.php | 1 + www-api/app/Controllers/AirFlow.php | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index e9d87722..117776dd 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -96,6 +96,7 @@ const CARD_REQUESTED = 1; const CARD_HOLDER_CREATED = 10; const CARD_OWNER_ACTIVE = 30; const CARD_ASSIGNED = 40; +const CARD_ACTIVATE_CARD = 50; define('EVENT_PRIORITY_HIGH', 10); define('WRB_JOB_CRONJOB',770); diff --git a/www-api/app/Controllers/AirFlow.php b/www-api/app/Controllers/AirFlow.php index 8fdba59e..9a248594 100644 --- a/www-api/app/Controllers/AirFlow.php +++ b/www-api/app/Controllers/AirFlow.php @@ -162,14 +162,21 @@ class AirFlow extends BaseController } // work on the list - -/* - if ( $out['request_id'] !='' && $out['request_uid'] !=''){ - $local_url = "http://".$this->micro_service_net1.":3038/createCardHolder"; - $out = $this->APIcall('POST', $local_url, $out); + //LET US ACTIVATE THE CARDS NOW + $in['limit'] = 2; + $in['status'] = CARD_ASSIGNED; // pick from holders + $local_url = "http://".$this->micro_service_net1.":3038/cardapplications"; + $outZ = $this->APIcall('POST', $local_url, $in); + log_message('critical', "AirFlow::flowStripeCard ********* ALL ".serialize($outZ) ); + foreach ($outZ['result_list'] as $index=>$item){ + if ( $item['request_id'] !='' && $item['request_uid'] !=''){ + $item['aggrement_ip'] = '76.209.103.227'; + $local_url = "http://".$this->micro_service_net1.":3038/activate"; + $out = $this->APIcall('POST', $local_url, $item); + } } - log_message('critical', "WrenchWallet::requestVirtualCard ********* ALL ".serialize($out) ); -*/ + + log_message('critical', "AirFlow::flowStripeCard ********* ALL ".serialize($in) ); return []; //json_encode( $final_out ); }