master
elf 3 years ago
parent 9eede38eab
commit fcae22fb75

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

Loading…
Cancel
Save