diff --git a/src/Clients/MindboxClientV3.php b/src/Clients/MindboxClientV3.php index 80ab50d..17661bb 100644 --- a/src/Clients/MindboxClientV3.php +++ b/src/Clients/MindboxClientV3.php @@ -26,9 +26,9 @@ class MindboxClientV3 extends AbstractMindboxClient const TMP_V3_URL = 'https://api-ru.mindbox.cloud/v3/operations/'; /** - * Секретный ключ. + * Имя схемы авторизации по секретному ключу. */ - const SECRET_KEY_NAME = 'Mindbox secretKey'; + const SECRET_KEY_AUTHORIZATION_SCHEME_NAME = 'SecretKey'; /** * @var string Доменная зона API. @@ -143,7 +143,7 @@ private function getDeviceUUID() */ protected function prepareAuthorizationHeader() { - return static::SECRET_KEY_NAME . '="' . $this->secretKey . '"'; + return static::SECRET_KEY_AUTHORIZATION_SCHEME_NAME . ' ' . $this->secretKey; } /** diff --git a/tests/Clients/MindboxClientV3Test.php b/tests/Clients/MindboxClientV3Test.php index 21eac33..08106c2 100644 --- a/tests/Clients/MindboxClientV3Test.php +++ b/tests/Clients/MindboxClientV3Test.php @@ -37,7 +37,7 @@ public function expectedArgsForSendProvider() 'headers' => [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', - 'Authorization' => 'Mindbox secretKey="' . $this->secret . '"', + 'Authorization' => 'SecretKey ' . $this->secret, 'X-Customer-IP' => '', 'Mindbox-Integration' => 'PhpSDK', 'Mindbox-Integration-Version' => '1.0' @@ -61,7 +61,7 @@ public function expectedArgsForSendProvider() 'headers' => [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', - 'Authorization' => 'Mindbox secretKey="' . $this->secret . '"', + 'Authorization' => 'SecretKey ' . $this->secret, 'X-Customer-IP' => '', 'Mindbox-Integration' => 'PhpSDK', 'Mindbox-Integration-Version' => '1.0' @@ -86,7 +86,7 @@ public function expectedArgsForSendProvider() 'headers' => [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', - 'Authorization' => 'Mindbox secretKey="' . $this->secret . '"', + 'Authorization' => 'SecretKey ' . $this->secret, 'Mindbox-Integration' => 'PhpSDK', 'Mindbox-Integration-Version' => '1.0' ],