From 59fc88ca8bd0cba0647937565a80cd9eec0c8b5e Mon Sep 17 00:00:00 2001 From: sanjeev Date: Thu, 20 Jan 2022 21:00:20 +0530 Subject: [PATCH] SMS config url : ps --- api/application/config/customconfig_one.php | 2 +- .../User_Management_Controller.php | 7 +++---- api/application/helpers/pdalerts_helper.php | 20 ++++++++++--------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/api/application/config/customconfig_one.php b/api/application/config/customconfig_one.php index 7b09fcba..da54dc42 100644 --- a/api/application/config/customconfig_one.php +++ b/api/application/config/customconfig_one.php @@ -112,7 +112,7 @@ cwIDAQAB // ************ SMSGUPSHUP Configurations ***********************// $config['sms_api_user_id'] = getenv('SMS_API_USER_ID'); $config['sms_api_pwd'] = getenv('SMS_API_PWD'); -$config['sms_gupshup_url'] = 'http://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to={{send_to_mobile_no}}&msg={{send_msg}}&msg_type=TEXT&userid={{sms_api_user_id}}&auth_scheme=plain&password={{sms_api_pwd}}&version=1.1&format=text'; +$config['sms_gupshup_url'] = 'http://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to={{send_to_mobile_no}}&msg={{send_msg}}&msg_type=TEXT&userid={{sms_api_user_id}}&auth_scheme=plain&password={{sms_api_pwd}}&v=1.1&format=text'; $config['master_tables_field_names'] = array('INDUSTRYCLASSIFICATION' => 'name','UOM' => 'name','OCCUPATIONMEMBERS' => 'name','EDUQUALIFICATION' => 'qualification_name', 'TYPEOFACTIVITY' => 'name','RELATIONSHIPS' => 'name','FREQUENCY' => 'name', 'CUSTOMERBEHAVIOUR' => 'description', 'CUSTOMERSEGMENT' => 'name','DESIGNATION' => 'designation', 'EARNINGMEMBERSSTATUS' => 'earning_member_status','EDUQUALIFICATION' => 'qualification_name','ADDRESSTYPE' => 'address_type','LOCALITY' => 'locality_name','ASSETTYPE' => 'name','PROPERTIES' => 'name','INVESTMENTTYPE' => 'name','INSURANCETYPE' => 'name','PERSONSMET' => 'person_met_name','RESIDENCEOWNERSHIP' => 'name','PAYMENTMODE' => 'name','ACCOUNTTYPE' => 'name','SOURCEOFOTHERINCOME' => 'name','MORTAGEPROPERTYTYPE' => 'name','ENDUSEOFLOAN' => 'enduse_of_loan','SOURCEOFBALANCETRANSFER' => 'name', 'STATUSOFCONSTRUCTION' => 'name','BTLENDERLIST'=>'lender_name','MORTAGEPROPERTIES'=>'property_name','EXISTINGLOANTYPES'=>'loan_type_name','PDAPPLICANTSDETAILS'=>'applicant_name','RELATIONWITHBUSINESS'=>'relation_with_business_name','BUSINESSENTITYTYPE'=>'business_entity_type_name','COMPANYRELATIONSHIPS'=>'name','STATE'=>'name','CITY'=>'name','COUNTRY'=>'country_name','BOUNCEMASTER'=>'bounce_reason_name','BUSINESSEXPENSES'=>'expense_item','BUSINESSINCOME'=>'business_income_item','COMMENTSONLOCALITY'=>'rating','COMPANY'=>'company_id','LOCALITY'=>'locality_name','NONINDIVIDUALENTITIES'=>'non_individual_entity_name','PDFORMS'=>'pd_form_name','PDLOCATIONAPPROACH'=>'description','PDTYPE'=>'type_name','PDNOTIFICATION'=>'pd_status','QUESTIONCATEGORY'=>'category_name','ROLES'=>'role_name','SUBPRODUCTS'=>'name','TITLES'=>'name','PINCODE'=>'pincode','PRODUCTS'=>'name','ENTITYTYPE'=>'name','PDTEAM'=>'team_name','ENTITY'=>'short_name','PDSTATUS'=>'pd_status_name','LISTOFMASTERS'=>'master_name','OTPREJECTION'=>'rejection_reason','ENDUSEOFTOPUP'=>'end_use_of_topup','VEHICLETYPE'=>'vehicle_type_name','PDOFFICERRECOMMENDATIONS'=>'pdofficer_recommendation','REGIONS'=>'name','PRICINGINFO'=>'pricing_info_id','SALESVENDORLIST' => 'vendor','SALESEQUIPMENTLIST' => 'equipment'); diff --git a/api/application/controllers/User_Management_Controller.php b/api/application/controllers/User_Management_Controller.php index c8b96244..ddf08957 100644 --- a/api/application/controllers/User_Management_Controller.php +++ b/api/application/controllers/User_Management_Controller.php @@ -565,10 +565,9 @@ else { $OTP = substr($string2,0,6); // $msg = "Your OTP for forgot password is ".$OTP."."; // SMS_GUPSHUP::sendSMS($msg,$mobile); - $msg = "OTP for starting your personal discussions with the verification officer is ".$OTP.".Pls share this only when the officer has reached your place"; - // $msg = "PD for Loan Applicant ".$OTP." ID - ".$userid." has been triggered."; - - SMS_GUPSHUP::sendSMS($msg,$mobile,array('userid' => $userid,'status' => 'STARTED','msg' => 'Started OTP msg from user controlller')); + // $msg = "OTP for starting your personal discussions with the verification officer is ".$OTP.".Pls share this only when the officer has reached your place"; + $msg = "PD for Loan Applicant ".$OTP." ID - ".$OTP." has been triggered."; + SMS_GUPSHUP::sendSMS($msg,$mobile,array('id'=>$userid,'msg'=>"Your OTP is ".$OTP." from User Management Controller")); $this->User_Management_Model->updateRecords(array('OTP'=>$OTP),USERPROFILE,array('userid'=>$userid)); $data['dataStatus'] = true; diff --git a/api/application/helpers/pdalerts_helper.php b/api/application/helpers/pdalerts_helper.php index 20ecc858..795e7115 100644 --- a/api/application/helpers/pdalerts_helper.php +++ b/api/application/helpers/pdalerts_helper.php @@ -726,7 +726,7 @@ class PDALERTS $CI->db->JOIN(PINCODE.' as PINCODE','PDTRIGGER.pincode = PINCODE.pincode_id','LEFT'); $CI->db->WHERE("PDTRIGGER.pd_id",$pd_id); $core_details = $CI->db->GET()->result_array(); - + // print_r($core_details);die(); $CI->db->SELECT("USERPROFILE.email"); $CI->db->FROM(USERPROFILE." as USERPROFILE"); $CI->db->JOIN(USERPROFILEROLES." as USERPROFILEROLES", "USERPROFILEROLES.isactive = 1 and USERPROFILEROLES.fk_userid = USERPROFILE.userid"); @@ -744,21 +744,21 @@ class PDALERTS else{ $mail_id = $rcm_mail_id; } - log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 2(RCM and CM) PD ID :'.$pd_id." & MAIL : ".$mail_id); - $msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." (".$core_details[0]['applicant_name'].") have been triggered to the vendor. "; - $subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno'] ." & ".$core_details[0]['applicant_name']; + log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 2(RCM and CM) PD ID :'.$pd_id." and MAIL : ".$mail_id); + $msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']." have been triggered to the vendor. "; + $subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']; $ref_str = "vendor email id"; } if($flag == 1){ // Mail Content For - Agency ONLY $mail_id = $core_details[0]['agency_mail']; - log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1(AGENCY) PD ID :'.$pd_id." & MAIL : ".$mail_id); - $msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']." have been allocated to you. "; - $subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']; + log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1(AGENCY) PD ID :'.$pd_id." and MAIL : ".$mail_id); + $msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']." have been allocated to you. "; + $subject = "PD allocated for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']; $ref_str = "client email id"; } if($flag == 3){ // Mail Conent For - Allocated Person ONLY $mail_id = $core_details[0]['allocated_email']; - log_message('ERROR','#### MW-AGENCY MAIL CALLED TYPE 3(Normal Allocated Person) PD ID :'.$pd_id." & MAIL : ".$mail_id); + log_message('ERROR','#### MW-AGENCY MAIL CALLED TYPE 3(Normal Allocated Person) PD ID : '.$pd_id." and MAIL : ".$mail_id); $CI->db->SELECT("*"); $CI->db->FROM(PDNOTIFICATIONMSG." as PDNOTIFICATIONMSG"); $CI->db->WHERE("PDNOTIFICATIONMSG.pd_status",ALLOCATED); @@ -766,11 +766,13 @@ class PDALERTS $pd_notification_msg = $CI->db->GET()->result_array(); $msg = $pd_notification_msg[0]['lender']; $msg = self::stringReplace($msg,$core_details,'MAIL'); - $subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']; + $subject = "PD allocated for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']; $ref_str = ""; // $mail->addBCC("sanjeev.p@venbainfotech.com"); } $company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-"; + + // $company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-"; $msg .= "

1. Name of the firm : ".$company_name ."
2. Address : ".$core_details[0]['addressline1'].",".$core_details[0]['city_name'].",".$core_details[0]['state_name']."-".$core_details[0]['pincode']."." ."
3. Loan Amount : ".$core_details[0]['loan_amount']