diff --git a/app/Controllers/ICICILombardController.php b/app/Controllers/ICICILombardController.php index 8bf81189..928fbc2f 100644 --- a/app/Controllers/ICICILombardController.php +++ b/app/Controllers/ICICILombardController.php @@ -12,18 +12,18 @@ class ICICILombardController extends AdminController public function generateAuthToken($scope = 'esbhealth') { helper('api'); - $url = 'https://ilesbapigee.insurancearticlez.com/generate-jwt-token'; + $url = env('ICICI_TOKEN_URL'); $method = 'POST'; $headers = [ 'Content-Type: application/x-www-form-urlencoded' ]; $body = [ - 'grant_type' => 'password', - 'username' => 'Nhanceins', - 'password' => 'SSWW7bFNaLxxQyw', - 'scope' => $scope, - 'client_id' => 'Nhanceins', - 'client_secret' => 'P4W0G6TAYMa0MV8bbVSx4pTAqbCcUIg48kCWa6PJykAhGWzPmpPr0iLuNWtz5wqN' + 'grant_type' => env('ICICI_GRANT_TYPE'), + 'username' => env('ICICI_USER_NAME'), + 'password' => env('ICICI_PASSWORD'), + 'scope' => env('ICICI_API_SCOPE'), + 'client_id' => env('ICICI_CLIENT_ID'), + 'client_secret' => env('ICICI_CLIENT_SECRET') ]; $response = call_third_party_api($url, $method, $headers, $body); @@ -42,8 +42,6 @@ class ICICILombardController extends AdminController public function createEnrollmentBatch() { - - $client_id = $this->request->getGet('client_id'); $client_branch_id = $this->request->getGet('client_branch_id'); $policy_id = $this->request->getGet('policy_id'); @@ -61,7 +59,7 @@ class ICICILombardController extends AdminController $token = $tokenResponse['data']['access_token']; - $url = 'https://ilesbapigee.insurancearticlez.com/health/ilservices/health/v1/enrollment/batchcreation'; + $url = env('ICICI_BASE_URL').'/batchcreation'; $headers = [ 'Authorization: Bearer ' . $token, 'Content-Type: application/json', @@ -71,7 +69,7 @@ class ICICILombardController extends AdminController //Prepare body data $db = \Config\Database::connect(); $data = $db->table('employee_polices ep') - ->select('cp.policy_no as policyNumber, + ->select('cp.policy_no as policyNumber, cp.cd_ac_no as CDBGAccountNumber, e.id,e.emp_code as MemberEmpId, e.doj as DOJ, e.name as InsuredName, e.dob as DOB, e.relationship as Relationship, e.gender as Gender, ep.date_coverage as DOC,ep.basic_cover_si as SumInsured, e.email_corporate as EmailId ') @@ -85,7 +83,7 @@ class ICICILombardController extends AdminController ->getResultArray(); $body = $this->formatPolicyData($data); - dd($body); + // dd($body); $response = call_third_party_api($url, 'POST', $headers, $body, true); // true = raw body mode // print_rr(json_encode($response));die(); @@ -108,7 +106,7 @@ class ICICILombardController extends AdminController $token = $tokenResponse['data']['access_token']; - $url = 'https://ilesbapigee.insurancearticlez.com/health/ilservices/health/v1/enrollment/batchstatus'; + $url = env('ICICI_BASE_URL').'/batchstatus'; $headers = [ 'Authorization: Bearer ' . $token, 'Content-Type: application/json' @@ -144,7 +142,7 @@ class ICICILombardController extends AdminController // print_rr($token); - $url = 'https://ilesbapigee.insurancearticlez.com/health/ilservices/health/v1/enrollment/fetchuhid'; + $url = env('ICICI_BASE_URL').'/fetchuhid'; $headers = [ 'Authorization: Bearer ' . $token, 'Content-Type: application/json' @@ -161,7 +159,6 @@ class ICICILombardController extends AdminController return $this->response->setJSON($response); } - public function formatPolicyData($data) { // Helper to format date @@ -203,7 +200,7 @@ class ICICILombardController extends AdminController // Final body return [ "PolicyNumber" => $data[0]['policyNumber'] ?? null, - "CDBGAccountNumber" => "CD-MUM-0026", + "CDBGAccountNumber" => $data[0]['CDBGAccountNumber'] ?? null , // "CD-MUM-0026", "CorrelationId" => $generateUUID(), "MemberDetails" => $memberDetails ]; diff --git a/app/Controllers/VidalApiController.php b/app/Controllers/VidalApiController.php index 54ffba09..b7418dbf 100644 --- a/app/Controllers/VidalApiController.php +++ b/app/Controllers/VidalApiController.php @@ -198,7 +198,7 @@ class VidalApiController extends BaseController helper('api'); - $url = ''. getenv('VIDAL_API_BASE_URL').'/enrollmendataservice'; + $url = getenv('VIDAL_API_BASE_URL').'/enrollmendataservice'; $method = 'POST'; $headers = [ diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 544b544b..001fa6a7 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -920,7 +920,8 @@ table.dataTable tbody td { enableFiltering: false, enableCaseInsensitiveFiltering: false, includeSelectAllOption : false, - buttonWidth:'100%' + buttonWidth:'100%', + dropUp: true }); $('.close').click(function(){ diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 90a5a4bf..541a6a98 100755 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -129,7 +129,7 @@