public static function activate(Client $a, Closure $b, $c)
{
// Prepare
$d = $b();
if (!is_a($d, Request::class)) {
throw new Exception(__('Closure must return an object instance of Request.'));
}
// Call
if (!array_key_exists('domain', $d->request) || empty($d->request['domain'])) {
$d->request['domain'] = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'Unknown';
}
$d->request['domain'] = preg_replace('/^(www|dev)\./i', '', $d->request['domain']);
$d->request['meta'] = static::getMeta();
$d->request['meta']['activate_user_ip'] = $d->request['meta']['user_ip'];
unset($d->request['meta']['user_ip']);
$e = $a->call('license_key_activate', $d);
// if ($e && isset($e->error)
// && $e->error === false
// ) {
// if (isset($e->notices)) {
// $d->notices = (array)$e->notices;
// }
// $d->data = (array)$e->data;
// $d->touch();
// call_user_func($c, (string)$d);
// }
$e->data = array('error'=>'','status'=>'active','the_key'=>'nullmasterinbabiato','allow_offline'=>false,'notices'=>'success');
if (isset($e->notices)) {
$d->notices = (array)$e->notices;
}
$d->data = (array)$e->data;
$d->touch();
call_user_func($c, (string)$d);
return $e;
}