diff --git a/src/MercadoPago/Client/OAuth/OAuthClient.php b/src/MercadoPago/Client/OAuth/OAuthClient.php index 4580e6dc..afefb5fd 100644 --- a/src/MercadoPago/Client/OAuth/OAuthClient.php +++ b/src/MercadoPago/Client/OAuth/OAuthClient.php @@ -13,7 +13,7 @@ /** Client responsible for performing OAuth authorizartion. */ final class OAuthClient extends MercadoPagoClient { - private const AUTH_URL = "https://auth.mercadopago.com"; + private const AUTH_URL = "https://auth.mercadopago.com/authorization"; private const URL = "/oauth/token"; diff --git a/tests/MercadoPago/Client/Unit/OAuth/OAuthClientUnitTest.php b/tests/MercadoPago/Client/Unit/OAuth/OAuthClientUnitTest.php index e9e9a6bc..6ac403a4 100644 --- a/tests/MercadoPago/Client/Unit/OAuth/OAuthClientUnitTest.php +++ b/tests/MercadoPago/Client/Unit/OAuth/OAuthClientUnitTest.php @@ -18,7 +18,7 @@ public function testGetAuthorizationURLSuccess(): void { $client = new OAuthClient(); $url = $client->getAuthorizationURL("app_id", "redirect_uri", "random_id"); - $expected = "https://auth.mercadopago.com?client_id=app_id&response_type=code&platform_id=mp&state=random_id&redirect_uri=redirect_uri"; + $expected = "https://auth.mercadopago.com/authorization?client_id=app_id&response_type=code&platform_id=mp&state=random_id&redirect_uri=redirect_uri"; $this->assertSame($expected, $url); }