check notification
This commit is contained in:
parent
b10cfa2a8e
commit
1315621259
@ -115,7 +115,7 @@ class Package
|
|||||||
$t->type = "Hotspot";
|
$t->type = "Hotspot";
|
||||||
$t->save();
|
$t->save();
|
||||||
}
|
}
|
||||||
sendTelegram("#u$c[username] #buy #Hotspot \n" . $p['name_plan'] .
|
Message::sendTelegram("#u$c[username] #buy #Hotspot \n" . $p['name_plan'] .
|
||||||
"\nRouter: " . $router_name .
|
"\nRouter: " . $router_name .
|
||||||
"\nGateway: " . $gateway .
|
"\nGateway: " . $gateway .
|
||||||
"\nChannel: " . $channel .
|
"\nChannel: " . $channel .
|
||||||
@ -189,7 +189,7 @@ class Package
|
|||||||
$t->type = "PPPOE";
|
$t->type = "PPPOE";
|
||||||
$t->save();
|
$t->save();
|
||||||
}
|
}
|
||||||
sendTelegram("#u$c[username] #buy #PPPOE \n" . $p['name_plan'] .
|
Message::sendTelegram("#u$c[username] #buy #PPPOE \n" . $p['name_plan'] .
|
||||||
"\nRouter: " . $router_name .
|
"\nRouter: " . $router_name .
|
||||||
"\nGateway: " . $gateway .
|
"\nGateway: " . $gateway .
|
||||||
"\nChannel: " . $channel .
|
"\nChannel: " . $channel .
|
||||||
@ -198,7 +198,7 @@ class Package
|
|||||||
|
|
||||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||||
|
|
||||||
sendWhatsapp($c['username'], "*$_c[CompanyName]*\n" .
|
$msg = "*$_c[CompanyName]*\n" .
|
||||||
"$_c[address]\n" .
|
"$_c[address]\n" .
|
||||||
"$_c[phone]\n" .
|
"$_c[phone]\n" .
|
||||||
"\n\n" .
|
"\n\n" .
|
||||||
@ -214,7 +214,13 @@ class Package
|
|||||||
"$_L[Created_On] :\n*" . date($_c['date_format'], strtotime($in['recharged_on'])) . " $in[time]*\n" .
|
"$_L[Created_On] :\n*" . date($_c['date_format'], strtotime($in['recharged_on'])) . " $in[time]*\n" .
|
||||||
"$_L[Expires_On] :\n*" . date($_c['date_format'], strtotime($in['expiration'])) . " $in[time]*\n" .
|
"$_L[Expires_On] :\n*" . date($_c['date_format'], strtotime($in['expiration'])) . " $in[time]*\n" .
|
||||||
"\n\n" .
|
"\n\n" .
|
||||||
"$_c[note]");
|
"$_c[note]";
|
||||||
|
|
||||||
|
if ($_c['user_notification_payment'] == 'sms') {
|
||||||
|
Message::sendSMS($c['phonenumber'], $msg);
|
||||||
|
} else if ($_c['user_notification_payment'] == 'wa') {
|
||||||
|
Message::sendWhatsapp($c['phonenumber'], $msg);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ switch ($action) {
|
|||||||
$t->type = "Hotspot";
|
$t->type = "Hotspot";
|
||||||
$t->save();
|
$t->save();
|
||||||
}
|
}
|
||||||
sendTelegram( "$admin[fullname] #Recharge Voucher #Hotspot for #u$c[username]\n".$p['name_plan'].
|
Message::sendTelegram( "$admin[fullname] #Recharge Voucher #Hotspot for #u$c[username]\n".$p['name_plan'].
|
||||||
"\nRouter: ".$server.
|
"\nRouter: ".$server.
|
||||||
"\nPrice: ".$p['price']);
|
"\nPrice: ".$p['price']);
|
||||||
} else {
|
} else {
|
||||||
@ -241,7 +241,7 @@ switch ($action) {
|
|||||||
$t->type = "PPPOE";
|
$t->type = "PPPOE";
|
||||||
$t->save();
|
$t->save();
|
||||||
}
|
}
|
||||||
sendTelegram( "$admin[fullname] #Recharge Voucher #PPPOE for #u$c[username]\n".$p['name_plan'].
|
Message::sendTelegram( "$admin[fullname] #Recharge Voucher #PPPOE for #u$c[username]\n".$p['name_plan'].
|
||||||
"\nRouter: ".$server.
|
"\nRouter: ".$server.
|
||||||
"\nPrice: ".$p['price']);
|
"\nPrice: ".$p['price']);
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ switch ($action) {
|
|||||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||||
$ui->assign('in', $in);
|
$ui->assign('in', $in);
|
||||||
|
|
||||||
sendWhatsapp($c['username'], "*$config[CompanyName]*\n".
|
$msg = "*$config[CompanyName]*\n".
|
||||||
"$config[address]\n".
|
"$config[address]\n".
|
||||||
"$config[phone]\n".
|
"$config[phone]\n".
|
||||||
"\n\n".
|
"\n\n".
|
||||||
@ -265,8 +265,13 @@ switch ($action) {
|
|||||||
"$_L[Created_On] :\n*".date($config['date_format'], strtotime($in['recharged_on']))." $in[time]*\n".
|
"$_L[Created_On] :\n*".date($config['date_format'], strtotime($in['recharged_on']))." $in[time]*\n".
|
||||||
"$_L[Expires_On] :\n*".date($config['date_format'], strtotime($in['expiration']))." $in[time]*\n".
|
"$_L[Expires_On] :\n*".date($config['date_format'], strtotime($in['expiration']))." $in[time]*\n".
|
||||||
"\n\n".
|
"\n\n".
|
||||||
"$config[note]");
|
"$config[note]";
|
||||||
|
|
||||||
|
if ($_c['user_notification_payment'] == 'sms') {
|
||||||
|
Message::sendSMS($c['phonenumber'], $msg);
|
||||||
|
} else if ($_c['user_notification_payment'] == 'wa') {
|
||||||
|
Message::sendWhatsapp($c['phonenumber'], $msg);
|
||||||
|
}
|
||||||
|
|
||||||
$ui->assign('date', $date_now);
|
$ui->assign('date', $date_now);
|
||||||
$ui->display('invoice.tpl');
|
$ui->display('invoice.tpl');
|
||||||
@ -631,7 +636,7 @@ switch ($action) {
|
|||||||
$v1->user = $c['username'];
|
$v1->user = $c['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
|
|
||||||
sendTelegram( "$admin[fullname] #Refill #Voucher #Hotspot for #u$c[username]\n".$p['name_plan'].
|
Message::sendTelegram( "$admin[fullname] #Refill #Voucher #Hotspot for #u$c[username]\n".$p['name_plan'].
|
||||||
"\nCode: ".$code.
|
"\nCode: ".$code.
|
||||||
"\nRouter: ".$v1['routers'].
|
"\nRouter: ".$v1['routers'].
|
||||||
"\nPrice: ".$p['price']);
|
"\nPrice: ".$p['price']);
|
||||||
@ -709,7 +714,7 @@ switch ($action) {
|
|||||||
$v1->save();
|
$v1->save();
|
||||||
|
|
||||||
|
|
||||||
sendTelegram( "$admin[fullname] Refill #Voucher #PPPOE for #u$c[username]\n".$p['name_plan'].
|
Message::sendTelegram( "$admin[fullname] Refill #Voucher #PPPOE for #u$c[username]\n".$p['name_plan'].
|
||||||
"\nCode: ".$code.
|
"\nCode: ".$code.
|
||||||
"\nRouter: ".$v1['routers'].
|
"\nRouter: ".$v1['routers'].
|
||||||
"\nPrice: ".$p['price']);
|
"\nPrice: ".$p['price']);
|
||||||
@ -718,7 +723,7 @@ switch ($action) {
|
|||||||
$ui->assign('in', $in);
|
$ui->assign('in', $in);
|
||||||
|
|
||||||
|
|
||||||
sendWhatsapp($c['username'], "*$config[CompanyName]*\n".
|
$msg = "*$config[CompanyName]*\n".
|
||||||
"$config[address]\n".
|
"$config[address]\n".
|
||||||
"$config[phone]\n".
|
"$config[phone]\n".
|
||||||
"\n\n".
|
"\n\n".
|
||||||
@ -734,8 +739,13 @@ switch ($action) {
|
|||||||
"$_L[Created_On] :\n*".date($config['date_format'], strtotime($in['recharged_on']))." $in[time]*\n".
|
"$_L[Created_On] :\n*".date($config['date_format'], strtotime($in['recharged_on']))." $in[time]*\n".
|
||||||
"$_L[Expires_On] :\n*".date($config['date_format'], strtotime($in['expiration']))." $in[time]*\n".
|
"$_L[Expires_On] :\n*".date($config['date_format'], strtotime($in['expiration']))." $in[time]*\n".
|
||||||
"\n\n".
|
"\n\n".
|
||||||
"$config[note]");
|
"$config[note]";
|
||||||
|
|
||||||
|
if ($_c['user_notification_payment'] == 'sms') {
|
||||||
|
Message::sendSMS($c['phonenumber'], $msg);
|
||||||
|
} else if ($_c['user_notification_payment'] == 'wa') {
|
||||||
|
Message::sendWhatsapp($c['phonenumber'], $msg);
|
||||||
|
}
|
||||||
$ui->assign('date', $date_now);
|
$ui->assign('date', $date_now);
|
||||||
$ui->display('invoice.tpl');
|
$ui->display('invoice.tpl');
|
||||||
} else {
|
} else {
|
||||||
|
@ -123,7 +123,7 @@ switch ($action) {
|
|||||||
$v1->user = $c['username'];
|
$v1->user = $c['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
// Telegram to Admin
|
// Telegram to Admin
|
||||||
sendTelegram('#u' . $c['username'] . " Activate #Voucher #Hotspot\n" . $p['name_plan'] .
|
Message::sendTelegram('#u' . $c['username'] . " Activate #Voucher #Hotspot\n" . $p['name_plan'] .
|
||||||
"\nCode: " . $code .
|
"\nCode: " . $code .
|
||||||
"\nRouter: " . $v1['routers'] .
|
"\nRouter: " . $v1['routers'] .
|
||||||
"\nPrice: " . $p['price']);
|
"\nPrice: " . $p['price']);
|
||||||
@ -200,7 +200,7 @@ switch ($action) {
|
|||||||
$v1->user = $c['username'];
|
$v1->user = $c['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
// Telegram to Admin
|
// Telegram to Admin
|
||||||
sendTelegram('#u' . $c['username'] . " Activate #Voucher #PPPOE\n" . $p['name_plan'] .
|
Message::sendTelegram('#u' . $c['username'] . " Activate #Voucher #PPPOE\n" . $p['name_plan'] .
|
||||||
"\nCode: " . $code .
|
"\nCode: " . $code .
|
||||||
"\nRouter: " . $v1['routers'] .
|
"\nRouter: " . $v1['routers'] .
|
||||||
"\nPrice: " . $p['price']);
|
"\nPrice: " . $p['price']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user