mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-25 21:34:31 +02:00
Send Message change Function name
This commit is contained in:
parent
942552e9ac
commit
e5f18ec7e4
1 changed files with 5 additions and 4 deletions
|
@ -39,20 +39,21 @@ class Message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sendExpiredNotification($phone, $name, $package, $textExpired, $via)
|
public static function sendPackageNotification($phone, $name, $package, $message, $via)
|
||||||
{
|
{
|
||||||
|
$msg = str_replace('[[name]]', "*$name*", $message);
|
||||||
|
$msg = str_replace('[[package]]', "*$package*", $msg);
|
||||||
if (
|
if (
|
||||||
!empty($phone) && strlen($phone) > 5
|
!empty($phone) && strlen($phone) > 5
|
||||||
&& !empty($textExpired) && in_array($via, ['sms', 'wa'])
|
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||||
) {
|
) {
|
||||||
$msg = str_replace('[[name]]', "*$name*", $textExpired);
|
|
||||||
$msg = str_replace('[[package]]', "*$package*", $msg);
|
|
||||||
if ($via == 'sms') {
|
if ($via == 'sms') {
|
||||||
Message::sendSMS($phone, $msg);
|
Message::sendSMS($phone, $msg);
|
||||||
} else if ($via == 'wa') {
|
} else if ($via == 'wa') {
|
||||||
Message::sendWhatsapp($phone, $msg);
|
Message::sendWhatsapp($phone, $msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return "$via: $msg";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue