From fcc0027c8f73d72d011fa9ef1b6bfe813ea24243 Mon Sep 17 00:00:00 2001 From: venbaSriram Date: Fri, 26 Oct 2018 18:33:38 +0530 Subject: [PATCH] INITIATED SMS by sriram --- api/application/controllers/PD_Controller.php | 10 ++++++++++ api/application/models/PD_Model.php | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index cc35e933..886bc27a 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -454,6 +454,16 @@ class PD_Controller extends REST_Controller { //print_r($pd_details); // OTP Generate Condition + if($pd_details['pd_status'] == INITIATED) + { + $msg = "Dear ".$pd_details['firstName'].", Office ".$pd_details['officerName']." is on his way to meet you for a personal discussion with regards to your loan application."; + $no = (string)$pd_details['mobile_no']; + unset($pd_details['mobile_no']); + unset($pd_details['firstName']); + unset($pd_details['officerName']); + $this->aws_sns->sendSMS($msg,$no); + + } if($pd_details['pd_status'] == STARTED) { $string2 = str_shuffle('1234567890'); diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 646a2297..8d07bf1d 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -579,8 +579,8 @@ class PD_Model extends SPARQ_Model { $this->db->select('OTP'); $this->db->where('pd_id',$pddata['pd_id']); $result = $this->db->get(PDTRIGGER.' as PDTRIGGER')->first_row(); - - if(count($result) !='0') + //print_r($result);die; + if($result !='') { if($result->OTP == $pddata['OTP']) {