From e052375dded8e03bb701aff0b8c6615feb5db592 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 31 Oct 2024 15:33:51 -0400 Subject: [PATCH] added second call --- www-api/app/Controllers/AirFlow.php | 14 ++++++++++++++ www-api/app/Controllers/BaseController.php | 1 + 2 files changed, 15 insertions(+) diff --git a/www-api/app/Controllers/AirFlow.php b/www-api/app/Controllers/AirFlow.php index d5ef39fc..ffcc4393 100644 --- a/www-api/app/Controllers/AirFlow.php +++ b/www-api/app/Controllers/AirFlow.php @@ -133,6 +133,20 @@ class AirFlow extends BaseController } } + //LET US GET TEH AGREEMENT FIXED + $in['limit'] = 2; + $in['status'] = CARD_HOLDER_CREATED; // pick from holders + $local_url = "http://".$this->micro_service_net1.":3038/cardapplications"; + $outX = $this->APIcall('POST', $local_url, $in); + log_message('critical', "AirFlow::flowStripeCard ********* ALL ".serialize($outX) ); + foreach ($outX['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/acceptterms"; + $out = $this->APIcall('POST', $local_url, $item); + } + } + // work on the list diff --git a/www-api/app/Controllers/BaseController.php b/www-api/app/Controllers/BaseController.php index 5da6c022..9d404dd6 100644 --- a/www-api/app/Controllers/BaseController.php +++ b/www-api/app/Controllers/BaseController.php @@ -431,6 +431,7 @@ abstract class BaseController extends Controller } public function APIcall($method, $url, $data) { + if(!is_array($data)) $data =[]; // // $curl = curl_init(); $curl = curl_init($url); switch ($method) {