fix history
This commit is contained in:
parent
9ca2933b5d
commit
3653fcbf87
@ -14,6 +14,16 @@ switch ($action) {
|
|||||||
$ui->assign('_title', $_L['Order_Voucher'] . ' - ' . $config['CompanyName']);
|
$ui->assign('_title', $_L['Order_Voucher'] . ' - ' . $config['CompanyName']);
|
||||||
$ui->display('user-order.tpl');
|
$ui->display('user-order.tpl');
|
||||||
break;
|
break;
|
||||||
|
case 'history':
|
||||||
|
$d = ORM::for_table('tbl_payment_gateway')
|
||||||
|
->where('username', $user['username'])
|
||||||
|
->find_many();
|
||||||
|
$paginator = Paginator::bootstrap('tbl_payment_gateway','username',$user['username']);
|
||||||
|
$ui->assign('paginator',$paginator);
|
||||||
|
$ui->assign('d', $d);
|
||||||
|
$ui->assign('_title', Lang::T('Order History') . ' - ' . $config['CompanyName']);
|
||||||
|
$ui->display('user-orderHistory.tpl');
|
||||||
|
break;
|
||||||
case 'package':
|
case 'package':
|
||||||
$ui->assign('_title', 'Order PPOE Internet - ' . $config['CompanyName']);
|
$ui->assign('_title', 'Order PPOE Internet - ' . $config['CompanyName']);
|
||||||
$routers = ORM::for_table('tbl_routers')->find_many();
|
$routers = ORM::for_table('tbl_routers')->find_many();
|
||||||
@ -49,6 +59,7 @@ switch ($action) {
|
|||||||
if ($trx['gateway'] == 'xendit') {
|
if ($trx['gateway'] == 'xendit') {
|
||||||
$pg = new PGXendit($trx,$user);
|
$pg = new PGXendit($trx,$user);
|
||||||
$result = $pg->getInvoice($trx['gateway_trx_id']);
|
$result = $pg->getInvoice($trx['gateway_trx_id']);
|
||||||
|
|
||||||
if ($result['status'] == 'PENDING') {
|
if ($result['status'] == 'PENDING') {
|
||||||
r2(U . "order/view/" . $trxid, 'w', Lang::T("Transaction still unpaid."));
|
r2(U . "order/view/" . $trxid, 'w', Lang::T("Transaction still unpaid."));
|
||||||
} else if (in_array($result['status'],['PAID','SETTLED']) && $trx['status'] != 2) {
|
} else if (in_array($result['status'],['PAID','SETTLED']) && $trx['status'] != 2) {
|
||||||
|
@ -299,7 +299,7 @@ switch ($action) {
|
|||||||
$t->type = "Hotspot";
|
$t->type = "Hotspot";
|
||||||
$t->save();
|
$t->save();
|
||||||
}
|
}
|
||||||
sendTelegram( "$admin[fullname] #Recharge Voucher #Hotspot for #$c[username]\n".$p['name_plan'].
|
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 {
|
||||||
@ -406,7 +406,7 @@ switch ($action) {
|
|||||||
$t->type = "PPPOE";
|
$t->type = "PPPOE";
|
||||||
$t->save();
|
$t->save();
|
||||||
}
|
}
|
||||||
sendTelegram( "$admin[fullname] #Recharge Voucher #PPPOE for #$c[username]\n".$p['name_plan'].
|
sendTelegram( "$admin[fullname] #Recharge Voucher #PPPOE for #u$c[username]\n".$p['name_plan'].
|
||||||
"\nRouter: ".$server.
|
"\nRouter: ".$server.
|
||||||
"\nPrice: ".$p['price']);
|
"\nPrice: ".$p['price']);
|
||||||
}
|
}
|
||||||
@ -950,7 +950,7 @@ switch ($action) {
|
|||||||
$v1->user = $c['username'];
|
$v1->user = $c['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
|
|
||||||
sendTelegram( "$admin[fullname] #Refill #Voucher #Hotspot for #$c[username]\n".$p['name_plan'].
|
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']);
|
||||||
@ -1063,7 +1063,7 @@ switch ($action) {
|
|||||||
$v1->save();
|
$v1->save();
|
||||||
|
|
||||||
|
|
||||||
sendTelegram( "$admin[fullname] Refill #Voucher #PPPOE for #$c[username]\n".$p['name_plan'].
|
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']);
|
||||||
|
@ -250,7 +250,7 @@ switch ($action) {
|
|||||||
$v1->user = $c['username'];
|
$v1->user = $c['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
// Telegram to Admin
|
// Telegram to Admin
|
||||||
sendTelegram( '#'.$c['username']." Activate #Voucher #Hotspot\n".$p['name_plan'].
|
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']);
|
||||||
@ -359,7 +359,7 @@ switch ($action) {
|
|||||||
$v1->user = $c['username'];
|
$v1->user = $c['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
// Telegram to Admin
|
// Telegram to Admin
|
||||||
sendTelegram( '#'.$c['username']." Activate #Voucher #PPPOE\n".$p['name_plan'].
|
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