diff --git a/.env b/.env
index f92c9c6..043facd 100644
--- a/.env
+++ b/.env
@@ -72,12 +72,12 @@ database.default.port = 3306
-WAAI_INSTANCE = '666FEE6738696'
-WAAI_TOKEN = '666fd862df687'
+WAAI_INSTANCE = '66712908EB75A'
+WAAI_TOKEN = '667128c844c48'
API_KEY = 'HgvlULWCIrs'; // Your API key
-DLT_Template_ID = '1105171896608602869'; // DLT Template ID
+DLT_Template_ID = '1107171922342349877'; // DLT Template ID
SENDER_ID = 'LDRCHN'; // Sender ID
SERVICE_NAME = 'TEMPLATE_BASED'; // Service name
diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php
index 600f0c0..557fcf5 100644
--- a/app/Controllers/MasterController.php
+++ b/app/Controllers/MasterController.php
@@ -846,7 +846,7 @@ class MasterController extends BaseController
$documentUrl = base_url();
helper('url');
- $url ='Preview and Approve Document';
+ $url ='Preview and Approve Document';
// $url = 'Preview and Approve Document';
$businessData = $this->BranchModel->select('branches.* , business.business_name ')
@@ -863,17 +863,14 @@ class MasterController extends BaseController
$number = '91'.$clientData->mobile_no; // Replace with dynamic recipient number
- // print_r($clientData);die;
+
if($clientData->whatsapp == 1){
$whatsApp_message = "Dear " . $clientData->name . "," . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve." ;
$notificationHelper->sendWhatsAppMessage($number, $whatsApp_message, $url);
- // return $this->respond(['success' => true, 'otp' => $otp]);
-
+
}
- if($clientData->sms == 1){
- $notificationHelper->sendSms($number, $clientData->name . "," . $businessData->business_name, '', $url, 'change_doc_status','');
- }
+
$statusData['client_docs_id'] = $doc_id;
@@ -937,9 +934,7 @@ class MasterController extends BaseController
$notificationHelper->sendWhatsAppMessage($number, $whatsApp_message, $url);
}
- if($clientData->sms == 1){
- $notificationHelper->sendSms($number, $clientData->name . "," . $businessData->business_name, '', $url, 'rememeber_message', '');
- }
+
return $this->respond(['success' => true, 'data' => 'Remember Send Successfully']);
} catch (\Exception $exception) {
@@ -969,7 +964,7 @@ class MasterController extends BaseController
->join('client', 'client.client_id = client_branch.client_id', 'left')
->where('client_docs.id', $id)
->first();
- print_r($clint_full_data);die;
+
$update = $this->ClientDocsModel->update($id, $data);
diff --git a/app/Controllers/TestController.php b/app/Controllers/TestController.php
index 9645a32..8a99ec5 100644
--- a/app/Controllers/TestController.php
+++ b/app/Controllers/TestController.php
@@ -51,9 +51,11 @@ class TestController extends Controller
{
$apiKey = 'HgvlULWCIrs'; // Your API key
$mobileNumbers = '919894638731'; // Recipient mobile numbers
- $DLTTemplateID = '1105171896608602869'; // DLT Template ID
- $senderId = 'LDRAJ'; // Sender ID
- $message = 'Dear Gowtham, 986532 is OTP to approve Service group for service name purposes.';
+ $DLTTemplateID = '1107171922342349877'; // DLT Template ID
+ $senderId = 'LDRCHN'; // Sender ID
+ $message = 'Dear {#var#},
+ {#var#} is OTP to approve {#var#} {#var#} for {#var#} purposes. -L D RAJ AND CO';
+
$serviceName = 'TEMPLATE_BASED'; // Service name
// URL encode the message
diff --git a/app/Helpers/NotificationHelper.php b/app/Helpers/NotificationHelper.php
index 56b5c3e..622c030 100644
--- a/app/Helpers/NotificationHelper.php
+++ b/app/Helpers/NotificationHelper.php
@@ -81,23 +81,17 @@ class NotificationHelper
return true;
}
- public function sendSms($number, $name= '', $otp='', $url ='', $message_type_name, $clint_full_data='')
+ public function sendSms($number, $name= '', $otp='', $url ='', $message_type_name, $client_full_data='')
{
- $apiKey = getenv('API_KEY'); // Your API key
- // $mobileNumbers = '919894638731'; // Recipient mobile numbers
- $mobileNumbers = $number; // Recipient mobile numbers
- $DLTTemplateID = getenv('DLT_Template_ID'); // DLT Template ID
- $senderId = getenv('SENDER_ID'); // Sender ID
- if($message_type_name == 'login_otp'){
- $message = 'Login OTP is: ' . $otp;
- }else if($message_type_name == 'change_doc_status'){
- $message = "Dear " . $name . " has requested your approval for a document. Please click the link below to preview and approve." ;
- }else if($message_type_name == 'rememeber_message'){
- $message = "Dear " . $name . " has requested your approval for a document. Please click the link below to preview and approve. \n\nClick here - " . $url; ;
- }else if($message_type_name == 'doc_verify'){
- $message = 'Dear'. $name .',' . $otp . 'is OTP to approve '. $clint_full_data['group_name'] .' for '. $clint_full_data['service_name'] .' purposes.';
+ $apiKey = getenv('API_KEY');
+ $mobileNumbers = $number;
+ $DLTTemplateID = getenv('DLT_Template_ID');
+ $senderId = getenv('SENDER_ID');
+ if($message_type_name == 'doc_verify')
+ {
+ $message = 'Dear '. $name .',
+ '. $otp .' is OTP to approve '. $client_full_data['group_name'] .' for '. $client_full_data['service_name'] .' purposes. -L D RAJ AND CO';
}
-
$serviceName = getenv('SERVICE_NAME'); // Service name
// URL encode the message