Default Changelist

This commit is contained in:
xl
2023-11-07 16:31:30 +08:00
parent e0d1811a00
commit cf03ebd6dc
+4 -3
View File
@@ -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;
} }
} }