diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 4fde1cf9..59ecbfbb 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -228,9 +228,9 @@ else if(ENVIRONMENT == 'production') defined('DIGILOCKER_GETFILE_URI') OR define('DIGILOCKER_GETFILE_URI','https://api.digitallocker.gov.in/public/oauth2/1/file/'); defined('GCP_BUCKET_NAME') OR define('GCP_BUCKET_NAME','pd-giene-data'); defined('CET_CREDITPD_INTEGRATION_REINSERTIMG_URL') OR define('CET_CREDITPD_INTEGRATION_REINSERTIMG_URL','https://partner.smcfinance.com/cet_creditpd/api/ReInsertImageData'); - defined('SMC_FINANCE_AUTH_URL') OR define('SMC_FINANCE_AUTH_URL','http://ums.devopsmcfinance.com/umsnode/ums/api/v1/auth/login'); defined('SMC_FINANCE_REFRESH_TOKEN') OR define('SMC_FINANCE_REFRESH_TOKEN','http://ums.devopsmcfinance.com/umsnode/ums/api/v1/auth/access-token'); - defined('SMC_FINANCE_UPDATE_URL') OR define('SMC_FINANCE_UPDATE_URL','http://devopsmcfinance.com/salesapi/salesapplication/v1/sales-lead/update-pd'); + defined('SMC_FINANCE_AUTH_URL') OR define('SMC_FINANCE_AUTH_URL','https://ums-backend-prod-jyjykemwhq-em.a.run.app/ums/api/v1/auth/getaccess'); + defined('SMC_FINANCE_UPDATE_URL') OR define('SMC_FINANCE_UPDATE_URL','https://node-activity-api-v1-prod-jyjykemwhq-em.a.run.app/salesapp/api/v1/sales-lead/update-pd'); /*************************TWILO CONSTANTS************************************************************/ defined('TWLIO_SID') OR define('TWLIO_SID',getenv('TWLIO_SID')); defined('TWLIO_AUTH_TOKEN') OR define('TWLIO_AUTH_TOKEN',getenv('TWLIO_AUTH_TOKEN')); diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 60ba5b52..f6eb63ea 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -1968,9 +1968,9 @@ public function filterSalesPDList_post() { log_message('ERROR', '## 1) random string : ' . $randomString . ' serial No : ' . $salepd_serial_no); /*************Inserting Here ******************/ - $records = array("sales_pd_sno" => $salepd_serial_no, "rand_string" => $randomString, "lender_id" => $lenderid, "product_id" => $product_id, "sales_pd_type" => $sales_pd_type, "applicant_id" => $applicantid, "applicant_name" => $applicantname, "isactive" => 1,"t_process_instance_id"=>1); + $records = array("sales_pd_sno" => $salepd_serial_no, "rand_string" => $randomString, "lender_id" => $lenderid, "product_id" => $product_id, "sales_pd_type" => $sales_pd_type, "applicant_id" => $applicantid, "applicant_name" => $applicantname, "isactive" => 1,"t_process_instance_id"=>1,"redirect_email"=> $usersemailid); if($user_id != null){ $records["createdby"] = $createdby; } - else{ $records["redirect_email"] = $usersemailid; $user_id = base64_encode($usersemailid);} + else{ $user_id = base64_encode($usersemailid);} $id = $this->Sales_PD_Model->saveRecords($records, SALES_PD_DATA); $salepdid = $id; @@ -2069,10 +2069,9 @@ public function filterSalesPDList_post() { $data['msg'] = 'Param (or) Value Not Missing,Please Check again'; } - if (ENVIRONMENT == 'production') { - $auth_user_id = "autotrigger@smcfinance.com"; - $auth_password = "sine1234"; + $auth_user_id = "salesapp@smcfinance.com"; + $auth_password = "atsales1234"; $token = base64_encode($auth_user_id . "#" . $auth_password . "#" . $user_id . "#" . $role_id . "#" . $current_date . "#" . $usersemailid . "#" . $salepdid."#".$officername); // echo $token; // log_message('ERROR','## 7) Finally, '.$data['msg']); diff --git a/api/application/helpers/smcfinance_helper.php b/api/application/helpers/smcfinance_helper.php index 034e938a..cf13dbee 100644 --- a/api/application/helpers/smcfinance_helper.php +++ b/api/application/helpers/smcfinance_helper.php @@ -15,7 +15,13 @@ class SMCFINANCE $headers = array('Content-Type: application/json'); try{ $ch = curl_init(); - $body = '{ "userCode": "APIEdge","userPass": "sineUAT", "application": [ "Sales App-API" ] }'; + if (ENVIRONMENT == 'production') { + $body = '{ "userCode": "APIEdge","userPass": "sineProd" }'; + } + else{ + $body = '{ "userCode": "APIEdge","userPass": "sineUAT", "application": [ "Sales App-API" ] }'; + } + log_message('ERROR',"## SMC Finance Auth Url Request ".$body); curl_setopt($ch, CURLOPT_URL, SMC_FINANCE_AUTH_URL); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); @@ -99,7 +105,12 @@ class SMCFINANCE $headers = array('Content-Type: application/json','Authorization: Bearer '.$token); try{ $ch = curl_init(); + if (ENVIRONMENT == 'production') { $body = '{"pdId":"'.$sales_pd_sno.'","pdStatus":"'.$sales_pd_status.'","salesLeadId":"'.$applicant_id.'"}'; + } + else{ + $body = '{"pdId":"'.$sales_pd_sno.'","pdStatus":"'.$sales_pd_status.'","salesLeadId":"'.$applicant_id.'"}'; + } log_message('ERROR',"SMC Finance Api Request ".$body); // $put_url = SMC_FINANCE_API_URL.$sales_pd_id.'/update-pd';