diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php
index a4abbb33..ee6f7f98 100755
--- a/app/Controllers/Notifications.php
+++ b/app/Controllers/Notifications.php
@@ -102,12 +102,13 @@ class Notifications extends BaseController
$receiving_status = $success['receiving_status'];
$parents_status = $success['receiving_status'];
$history_msg = strtolower(gettype($success)) == "string" ? $success : json_encode($success['reponse']);
- session()->setFlashdata('success', 'Message : ' . $success['message']);
+ $tag = (int)$receiving_status === 0 ? 'success' : 'error' ;
+ session()->setFlashdata($tag, 'Message : ' . $success['message']);
$this->logger->info("Whatsapp : Reponse = " . $success['message']);
} catch (\Exception $e) {
$this->logger->error("Whatsapp : Exception Message = " . $e->getMessage() . "
File: " . $e->getFile() . "
Line: " . $e->getLine() . "
");
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
- $history_msg = strtolower(gettype($success)) == "string" ? $success : json_encode($success['reponse']);
+ $history_msg = $e->getMessage();
}
$NotificationModel = new NotificationModel();
$history_parents_data = ['campaign_id' => 0,'status' => $parents_status];
diff --git a/app/Helpers/NotificationHelper.php b/app/Helpers/NotificationHelper.php
index da34e98a..9cecf2c1 100644
--- a/app/Helpers/NotificationHelper.php
+++ b/app/Helpers/NotificationHelper.php
@@ -143,7 +143,7 @@ class NotificationHelper
curl_close($curl);
} catch (\Exception $e) {
$this->logger->error('Helper : Whatsapp Exception Occur = ' . $e->getMessage());
- $final_result['message'] = "Exception Errno returned " . $e->getMessage() . "
";
+ $final_result['message'] = $e->getMessage();
$final_result['receiving_status'] = 0 ;
}
$final_result['reponse'] = json_decode($curl_exec);
diff --git a/app/Views/noifications_acknowlegdement.php b/app/Views/noifications_acknowlegdement.php
index c83032cd..724b5b79 100644
--- a/app/Views/noifications_acknowlegdement.php
+++ b/app/Views/noifications_acknowlegdement.php
@@ -19,21 +19,26 @@