Default Changelist
This commit is contained in:
@@ -19,7 +19,7 @@ class TransferBatches extends SmallProgram
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
#[ArrayShape(['code_url' => "string"])]
|
#[ArrayShape(['code_url' => "string"])]
|
||||||
public function request(TransferDetail $detail): array|string
|
public function request(TransferDetail $detail): array
|
||||||
{
|
{
|
||||||
$body = [];
|
$body = [];
|
||||||
$body['appid'] = $this->getConfig()->getAppid();
|
$body['appid'] = $this->getConfig()->getAppid();
|
||||||
@@ -48,8 +48,9 @@ class TransferBatches extends SmallProgram
|
|||||||
|
|
||||||
$data = json_decode($client->getBody(), TRUE);
|
$data = json_decode($client->getBody(), TRUE);
|
||||||
if (json_last_error() != JSON_ERROR_NONE) {
|
if (json_last_error() != JSON_ERROR_NONE) {
|
||||||
return $client->getBody();
|
return ['errorcoe' => $client->getStatusCode(), 'errormsg' => $client->getBody()];
|
||||||
|
} else {
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
return $data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user