|
|
@ -64,7 +64,7 @@ class MhxlClient
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
$result = (string)$response->getBody();
|
|
|
|
$result = (string)$response->getBody();
|
|
|
|
Log::info('Mhxl ' . json_encode($params) . ' ' . $result);
|
|
|
|
Log::info('Mhxl ' . json_encode($params) . ' ' . $result);
|
|
|
|
return $this->prepareResult($result);
|
|
|
|
return json_decode($result, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected function get($uri, array $params = [])
|
|
|
|
protected function get($uri, array $params = [])
|
|
|
@ -75,22 +75,7 @@ class MhxlClient
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
$result = (string)$response->getBody();
|
|
|
|
$result = (string)$response->getBody();
|
|
|
|
Log::info('Mhxl ' . json_encode($params) . ' ' . $result);
|
|
|
|
Log::info('Mhxl ' . json_encode($params) . ' ' . $result);
|
|
|
|
return $this->prepareResult($result);
|
|
|
|
return json_decode($result, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected function prepareResult($result)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ($result == 'SUCCESS') {
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'code' => 0,
|
|
|
|
|
|
|
|
'msg' => $result,
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'code' => 1,
|
|
|
|
|
|
|
|
'msg' => $result,
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected function sign($name, $params)
|
|
|
|
protected function sign($name, $params)
|
|
|
|