forked from kevinowino869/mitrobill
if has keyword, then add to user recharge
This commit is contained in:
@ -276,11 +276,9 @@ class Package
|
||||
}
|
||||
}
|
||||
//}
|
||||
// if started with voucher, don't insert into tbl_user_recharges
|
||||
// this is not necessary, but in case a bug come
|
||||
if (strlen($p['device']) > 7 && substr($p['device'], 0, 7) == 'Voucher') {
|
||||
// maybe something need in here for buy Voucher
|
||||
}else{
|
||||
|
||||
// if contains 'mikrotik', 'hotspot', 'pppoe', 'radius' then recharge it
|
||||
if (Validator::containsKeyword($p['device'])) {
|
||||
$b->customer_id = $id_customer;
|
||||
$b->username = $c['username'];
|
||||
$b->plan_id = $plan_id;
|
||||
@ -392,10 +390,9 @@ class Package
|
||||
);
|
||||
}
|
||||
}
|
||||
// if started with voucher, don't insert into tbl_user_recharges
|
||||
if (strlen($p['device']) > 7 && substr($p['device'], 0, 7) == 'Voucher') {
|
||||
|
||||
}else{
|
||||
// if contains 'mikrotik', 'hotspot', 'pppoe', 'radius' then recharge it
|
||||
if (Validator::containsKeyword($p['device'])) {
|
||||
$d = ORM::for_table('tbl_user_recharges')->create();
|
||||
$d->customer_id = $id_customer;
|
||||
$d->username = $c['username'];
|
||||
|
Reference in New Issue
Block a user