add [[price]] to reminder notification
This commit is contained in:
parent
b504723e7c
commit
64f52d6c1c
@ -5,6 +5,8 @@
|
|||||||
## 2024.1.16
|
## 2024.1.16
|
||||||
|
|
||||||
- Add yellow color to table for plan not allowed to purchase
|
- Add yellow color to table for plan not allowed to purchase
|
||||||
|
- Fix Radius pool select
|
||||||
|
- add price to reminder notification
|
||||||
|
|
||||||
## 2024.1.15
|
## 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('[[name]]', "$name", $message);
|
||||||
$msg = str_replace('[[package]]', "*$package*", $msg);
|
$msg = str_replace('[[package]]', "$package", $msg);
|
||||||
|
$msg = str_replace('[[price]]', "$price", $msg);
|
||||||
if (
|
if (
|
||||||
!empty($phone) && strlen($phone) > 5
|
!empty($phone) && strlen($phone) > 5
|
||||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||||
@ -85,9 +86,9 @@ class Message
|
|||||||
|
|
||||||
public static function sendBalanceNotification($phone, $name, $balance, $balance_now, $message, $via)
|
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('[[current_balance]]', Lang::moneyFormat($balance_now), $msg);
|
||||||
$msg = str_replace('[[balance]]', "*" . Lang::moneyFormat($balance) . "*", $msg);
|
$msg = str_replace('[[balance]]', Lang::moneyFormat($balance), $msg);
|
||||||
if (
|
if (
|
||||||
!empty($phone) && strlen($phone) > 5
|
!empty($phone) && strlen($phone) > 5
|
||||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||||
|
@ -104,13 +104,15 @@ print_r([$day1, $day3, $day7]);
|
|||||||
foreach ($d as $ds) {
|
foreach ($d as $ds) {
|
||||||
if (in_array($ds['expiration'], [$day1, $day3, $day7])) {
|
if (in_array($ds['expiration'], [$day1, $day3, $day7])) {
|
||||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
$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();
|
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||||
|
$price = Lang::moneyFormat($p['price']);
|
||||||
if ($ds['expiration'] == $day7) {
|
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) {
|
} 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) {
|
} 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
|
Language Name: English
|
||||||
Contributor: Ismail Marzuqi
|
Contributor: Ismail Marzuqi
|
||||||
Web: www.phpnuxbill.com
|
|
||||||
Email: iesien22@yahoo.com
|
|
||||||
|
|
||||||
2017
|
2017
|
||||||
Contributor: Ibnu Maksum (@ibnux)
|
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['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['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['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['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['Transaction_Not_found'] = 'Transaction Not found';
|
||||||
$_L['Cancel_it'] = 'Cancel it?';
|
$_L['Cancel_it'] = 'Cancel it?';
|
||||||
@ -314,7 +311,6 @@ $_L['User_Notification'] = 'User Notification';
|
|||||||
$_L['Expired_Notification'] = 'Expired Notification';
|
$_L['Expired_Notification'] = 'Expired Notification';
|
||||||
$_L['User_will_get_notification_when_package_expired'] = 'User will get notification when package expired';
|
$_L['User_will_get_notification_when_package_expired'] = 'User will get notification when package expired';
|
||||||
$_L['Expired_Notification_Message'] = 'Expired Notification Message';
|
$_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['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['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';
|
$_L['Current_IP'] = 'Current IP';
|
||||||
@ -422,7 +418,3 @@ $_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation succes
|
|||||||
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
$_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['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['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';
|
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
Language Name: Indonesia
|
Language Name: Indonesia
|
||||||
Contributor: Ismail Marzuqi
|
Contributor: Ismail Marzuqi
|
||||||
Web: www.phpnuxbill.com
|
|
||||||
Email: iesien22@yahoo.com
|
|
||||||
|
|
||||||
2017
|
2017
|
||||||
Contributor: Ibnu Maksum (@ibnux)
|
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>
|
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2024.1.15"
|
"version": "2024.1.16"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user