]> _ Git - cubist_dsn.git/commitdiff
wait #7646 master
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Oct 2025 10:42:53 +0000 (12:42 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Oct 2025 10:42:53 +0000 (12:42 +0200)
src/Api.php

index f2c853f82e1fea21fe0b9c94f5a0472674ed35d3..adda91889594a95457fa15b7cf680ded596a0aa9 100644 (file)
@@ -24,8 +24,9 @@ class Api
     {
         $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();
         });