getConfig()->getAppid(); $body['out_batch_no'] = $detail->out_detail_no; $body["batch_name"] = $this->getConfig()->getBody(); $body["body"] = $this->getConfig()->getBody(); $body["batch_remark"] = $this->getConfig()->getBody(); $body["total_amount"] = $detail->transfer_amount; $body["total_num"] = 1; $body["transfer_detail_list"] = [$detail->toArray()]; $sign = $this->signature('POST', '/v3/transfer/batches', $json = json_encode($body, JSON_UNESCAPED_UNICODE)); $client = $this->createClient($sign, $json); $client->post('/v3/transfer/batches'); $client->close(); $data = json_decode($client->getBody(), TRUE); if (json_last_error() != JSON_ERROR_NONE) { return ['code' => $client->getStatusCode(), 'message' => $client->getBody()]; } else { return $data; } } }