Add Balance to notification

This commit is contained in:
Ibnu Maksum
2023-09-13 16:23:51 +07:00
parent 309bbc0059
commit 53eb817de4
4 changed files with 20 additions and 13 deletions

View File

@ -56,9 +56,10 @@ class Message
return "$via: $msg";
}
public static function sendBalanceNotification($phone, $name, $balance, $message, $via)
public static function sendBalanceNotification($phone, $name, $balance, $balance_now, $message, $via)
{
$msg = str_replace('[[name]]', "*$name*", $message);
$msg = str_replace('[[current_balance]]', Lang::moneyFormat($balance_now), $msg);
$msg = str_replace('[[balance]]', "*" . Lang::moneyFormat($balance) . "*", $msg);
if (
!empty($phone) && strlen($phone) > 5