{
$this->client = new Client();
$this->token = cache()->remember('dsn_' . $siret, 7200, function () use ($siret, $name, $firstname, $password, $service) {
+ $auth= $this->_authRequest($siret, $name, $firstname, $password, $service);
$response = $this->_request('POST', self::AUTH_URL,
- ['body' => $this->_authRequest($siret, $name, $firstname, $password, $service), 'headers' => ['Content-Type' => 'application/xml', 'User-Agent' => self::USER_AGENT]]
+ ['body' =>$auth, 'headers' => ['Content-Type' => 'application/xml', 'User-Agent' => self::USER_AGENT]]
);
return $response->getBody()->getContents();
});