Lost Boolean params while Request signing (#10)
This commit is contained in:
parent
f919a3a99f
commit
b8f4cfa149
@ -264,6 +264,8 @@ class TopRequestFactory implements TopRequestFactoryInterface
|
|||||||
*
|
*
|
||||||
* @return string|resource|null
|
* @return string|resource|null
|
||||||
* @todo Arrays will be encoded to JSON. Is this correct? Press X to doubt.
|
* @todo Arrays will be encoded to JSON. Is this correct? Press X to doubt.
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||||
*/
|
*/
|
||||||
private function castValue($value)
|
private function castValue($value)
|
||||||
{
|
{
|
||||||
@ -274,6 +276,7 @@ class TopRequestFactory implements TopRequestFactoryInterface
|
|||||||
case 'NULL':
|
case 'NULL':
|
||||||
return $value;
|
return $value;
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
|
return $value ? 'true' : 'false';
|
||||||
case 'integer':
|
case 'integer':
|
||||||
case 'double':
|
case 'double':
|
||||||
case 'string':
|
case 'string':
|
||||||
|
@ -255,7 +255,7 @@ class TopClient implements TopClientInterface
|
|||||||
try {
|
try {
|
||||||
$httpResponse = $this->httpClient->sendRequest($httpRequest);
|
$httpResponse = $this->httpClient->sendRequest($httpRequest);
|
||||||
} catch (ClientExceptionInterface $exception) {
|
} catch (ClientExceptionInterface $exception) {
|
||||||
throw new TopClientException(sprintf('Error sending request: %s', $exception->getMessage()), $exception);
|
throw new TopClientException(sprintf('Error sending request: %s', $exception->getMessage()), 0, $exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
$bodyData = self::getBodyContents($httpResponse->getBody());
|
$bodyData = self::getBodyContents($httpResponse->getBody());
|
||||||
|
@ -141,7 +141,7 @@ EOF;
|
|||||||
'app_key' => self::getEnvAppKey(),
|
'app_key' => self::getEnvAppKey(),
|
||||||
'method' => 'aliexpress.solution.seller.category.tree.query',
|
'method' => 'aliexpress.solution.seller.category.tree.query',
|
||||||
'category_id' => '5090300',
|
'category_id' => '5090300',
|
||||||
'filter_no_permission' => 1,
|
'filter_no_permission' => 'true',
|
||||||
'session' => self::getEnvToken()
|
'session' => self::getEnvToken()
|
||||||
]),
|
]),
|
||||||
$this->responseJson(200, $json)
|
$this->responseJson(200, $json)
|
||||||
|
Loading…
Reference in New Issue
Block a user