add [[price]] to reminder notification
This commit is contained in:
parent
b504723e7c
commit
64f52d6c1c
@ -5,6 +5,8 @@
|
||||
## 2024.1.16
|
||||
|
||||
- Add yellow color to table for plan not allowed to purchase
|
||||
- Fix Radius pool select
|
||||
- add price to reminder notification
|
||||
|
||||
## 2024.1.15
|
||||
|
||||
|
@ -66,10 +66,11 @@ class Message
|
||||
}
|
||||
}
|
||||
|
||||
public static function sendPackageNotification($phone, $name, $package, $message, $via)
|
||||
public static function sendPackageNotification($phone, $name, $package, $price, $message, $via)
|
||||
{
|
||||
$msg = str_replace('[[name]]', "*$name*", $message);
|
||||
$msg = str_replace('[[package]]', "*$package*", $msg);
|
||||
$msg = str_replace('[[name]]', "$name", $message);
|
||||
$msg = str_replace('[[package]]', "$package", $msg);
|
||||
$msg = str_replace('[[price]]', "$price", $msg);
|
||||
if (
|
||||
!empty($phone) && strlen($phone) > 5
|
||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||
@ -85,9 +86,9 @@ class Message
|
||||
|
||||
public static function sendBalanceNotification($phone, $name, $balance, $balance_now, $message, $via)
|
||||
{
|
||||
$msg = str_replace('[[name]]', "*$name*", $message);
|
||||
$msg = str_replace('[[name]]', "$name", $message);
|
||||
$msg = str_replace('[[current_balance]]', Lang::moneyFormat($balance_now), $msg);
|
||||
$msg = str_replace('[[balance]]', "*" . Lang::moneyFormat($balance) . "*", $msg);
|
||||
$msg = str_replace('[[balance]]', Lang::moneyFormat($balance), $msg);
|
||||
if (
|
||||
!empty($phone) && strlen($phone) > 5
|
||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||
|
@ -104,13 +104,15 @@ print_r([$day1, $day3, $day7]);
|
||||
foreach ($d as $ds) {
|
||||
if (in_array($ds['expiration'], [$day1, $day3, $day7])) {
|
||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||
$price = Lang::moneyFormat($p['price']);
|
||||
if ($ds['expiration'] == $day7) {
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $p['name_plan'], $price, Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
||||
} else if ($ds['expiration'] == $day3) {
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $p['name_plan'], $price, Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
||||
} else if ($ds['expiration'] == $day1) {
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $p['name_plan'], $price, Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,6 @@
|
||||
-----------------------------------
|
||||
Language Name: English
|
||||
Contributor: Ismail Marzuqi
|
||||
Web: www.phpnuxbill.com
|
||||
Email: iesien22@yahoo.com
|
||||
|
||||
2017
|
||||
Contributor: Ibnu Maksum (@ibnux)
|
||||
@ -261,7 +259,6 @@ $_L['Plan_Not_found'] = 'Plan Not found';
|
||||
$_L['Failed_to_create_transaction'] = 'Failed to create transaction.';
|
||||
$_L['Seller_has_not_yet_setup_Xendit_payment_gateway'] = 'Seller has not yet setup Xendit payment gateway';
|
||||
$_L['Admin_has_not_yet_setup_Xendit_payment_gateway_please_tell_admin'] = 'Admin has not yet setup Xendit payment gateway, please tell admin';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
$_L['You_already_have_unpaid_transaction_cancel_it_or_pay_it'] = 'You already have unpaid transaction, cancel it or pay it.';
|
||||
$_L['Transaction_Not_found'] = 'Transaction Not found';
|
||||
$_L['Cancel_it'] = 'Cancel it?';
|
||||
@ -314,7 +311,6 @@ $_L['User_Notification'] = 'User Notification';
|
||||
$_L['Expired_Notification'] = 'Expired Notification';
|
||||
$_L['User_will_get_notification_when_package_expired'] = 'User will get notification when package expired';
|
||||
$_L['Expired_Notification_Message'] = 'Expired Notification Message';
|
||||
$_L['bnameb_will_be_replaced_with_Customer_Name_bpackageb_will_be_replaced_with_Package_name'] = '<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.';
|
||||
$_L['Payment_Notification'] = 'Payment Notification';
|
||||
$_L['User_will_get_invoice_notification_when_buy_package_or_package_refilled'] = 'User will get invoice notification when buy package or package refilled';
|
||||
$_L['Current_IP'] = 'Current IP';
|
||||
@ -411,18 +407,14 @@ $_L['Resend_To_Customer'] = 'Resend To Customer';
|
||||
$_L['Your_friend_do_not_have_active_package'] = 'Your friend do not have active package';
|
||||
$_L['Service_Type'] = 'Service Type';
|
||||
$_L['Others'] = 'Others';
|
||||
$_L['PPPoE'] = 'PPPoE';
|
||||
$_L['Hotspot'] = 'Hotspot';
|
||||
$_L['Disable_Registration'] = 'Disable Registration';
|
||||
$_L['Customer_just_Login_with_Phone_number_and_Voucher_Code_Voucher_will_be_password'] = 'Customer just Login with Phone number and Voucher Code, Voucher will be password';
|
||||
$_L['Login__Activate_Voucher'] = 'Login / Activate Voucher';
|
||||
$_L['After_Customer_activate_voucher_or_login_customer_will_be_redirected_to_this_url'] = 'After Customer activate voucher or login, customer will be redirected to this url';
|
||||
$_L['Voucher_Prefix'] = 'Voucher Prefix';
|
||||
$_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation success, now you can login';
|
||||
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
||||
$_L['Buy_this_your_active_package_will_be_overwritten'] = 'Buy this? your active package will be overwritten';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwritten'] = 'Pay this with Balance? your active package will be overwritten';
|
||||
$_L['Buy_this_your_active_package_will_be_overwritten'] = 'Buy this? your active package will be overwritten';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwritten'] = 'Pay this with Balance? your active package will be overwritten';
|
||||
$_L['Buy_this_your_active_package_will_be_overwritten'] = 'Buy this? your active package will be overwritten';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwritten'] = 'Pay this with Balance? your active package will be overwritten';
|
||||
$_L['PPPoE'] = 'PPPoE';
|
||||
$_L['Hotspot'] = 'Hotspot';
|
||||
$_L['Disable_Registration'] = 'Disable Registration';
|
||||
$_L['Customer_just_Login_with_Phone_number_and_Voucher_Code_Voucher_will_be_password'] = 'Customer just Login with Phone number and Voucher Code, Voucher will be password';
|
||||
$_L['Login__Activate_Voucher'] = 'Login / Activate Voucher';
|
||||
$_L['After_Customer_activate_voucher_or_login_customer_will_be_redirected_to_this_url'] = 'After Customer activate voucher or login, customer will be redirected to this url';
|
||||
$_L['Voucher_Prefix'] = 'Voucher Prefix';
|
||||
$_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation success, now you can login';
|
||||
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
||||
$_L['Buy_this_your_active_package_will_be_overwritten'] = 'Buy this? your active package will be overwritten';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwritten'] = 'Pay this with Balance? your active package will be overwritten';
|
||||
|
@ -3,9 +3,6 @@
|
||||
-----------------------------------
|
||||
Language Name: Indonesia
|
||||
Contributor: Ismail Marzuqi
|
||||
Web: www.phpnuxbill.com
|
||||
Email: iesien22@yahoo.com
|
||||
|
||||
2017
|
||||
Contributor: Ibnu Maksum (@ibnux)
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
||||
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -33,7 +33,7 @@
|
||||
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
||||
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,7 +45,7 @@
|
||||
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
||||
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -57,7 +57,7 @@
|
||||
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
||||
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.1.15"
|
||||
"version": "2024.1.16"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user