WHMCS error when using easy billet

Asked

Viewed 78 times

0

I am using the easy boleto module for whmcs it is returning the following error

array(2) { ["result"]=> string(5) "error" ["message"]=> string(51) "Admin User var is required if no admin is logged in" }

my Cod that generates this error is this

function cpfcnpj($busca,$id){
        $dados['clientid'] = $id;
        $dados['stats'] = true;
        $dados['responsetype'] = 'xml';

        $cliente = localAPI('getclientsdetails',$dados);
        var_dump($cliente);
        foreach ($cliente['client']['customfields'] as $pos=>$val)
            if (in_array($busca, $val)) {
                $campo = $pos;
            break;
        }
        $valor = $cliente['client']['customfields'][$campo]['value'];

        return $valor;
    }

where is this localAPI ? or how it should be resolved?

1 answer

0

I managed to solve the parameter localAPI requires an admin user

then changing to

 $cliente = localAPI('getclientsdetails',$dados,'adm');

where Adm is my administrative whmcs user the problem has been solved.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.