ppoe_password Set to package

This commit is contained in:
Ibnu Maksum
2023-08-14 13:21:41 +07:00
parent 5b7e84fb75
commit d9bda444e9
8 changed files with 41 additions and 7 deletions

View File

@ -216,12 +216,17 @@ class Mikrotik
public static function addPpoeUser($client, $plan, $customer)
{
$addRequest = new RouterOS\Request('/ppp/secret/add');
if(!empty($customer['pppoe_password'])){
$pass = $customer['pppoe_password'];
}else{
$pass = $customer['password'];
}
$client->sendSync(
$addRequest
->setArgument('name', $customer['username'])
->setArgument('service', 'pppoe')
->setArgument('profile', $plan['name_plan'])
->setArgument('password', $customer['password'])
->setArgument('password', $pass)
);
}