Closed qdequippe closed 1 year ago
Hi,
With the addition of $clientIdRequired to GetObject and to RestTool all authentication requests are prefixed the clientId.
$clientIdRequired
GetObject
RestTool
This cause authentication errors and all requests failed.
http://localhost/v2.01/test/oauth/token
Steps to reproduce
var_dump($this->_requestUrl)
MangoPay\Libraries\RestTool.php
# MangoPay\Libraries\RestTool.php line 182 private function BuildRequest($urlMethod, $pagination, $additionalUrlParams = null, $idempotencyKey = null) { $urlTool = new UrlTool($this->_root); $restUrl = $urlTool->GetRestUrl($urlMethod, $this->_clientIdRequired, $pagination, $additionalUrlParams); $this->_requestUrl = $urlTool->GetFullUrl($restUrl); var_dump($this->_requestUrl); ....
Actual result
$ ./vendor/bin/phpunit PHPUnit 9.5.26 by Sebastian Bergmann and contributors. .string(67) "https://api.sandbox.mangopay.com/v2.01/sdk-unit-tests/users/natural" string(66) "https://api.sandbox.mangopay.com/v2.01/sdk-unit-tests/oauth/token/" string(87) "https://api.sandbox.mangopay.com/v2.01/sdk-unit-tests/users/155912793/bankaccounts/iban" ...
A workaround is to use version 3.14.1 of this sdk.
3.14.1
Hello @qdequippe, we are looking into it
Hi,
With the addition of
$clientIdRequired
toGetObject
and toRestTool
all authentication requests are prefixed the clientId.This cause authentication errors and all requests failed.
Steps to reproduce
var_dump($this->_requestUrl)
inMangoPay\Libraries\RestTool.php
line 182 (see example below)Actual result