Default Changelist

This commit is contained in:
xl
2023-11-07 16:29:44 +08:00
parent 1a78bdb173
commit e0d1811a00
2 changed files with 6 additions and 5 deletions
+6 -4
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 public function request(TransferDetail $detail): array|string
{ {
$body = []; $body = [];
$body['appid'] = $this->getConfig()->getAppid(); $body['appid'] = $this->getConfig()->getAppid();
@@ -46,8 +46,10 @@ class TransferBatches extends SmallProgram
$client->post('/v3/transfer/batches'); $client->post('/v3/transfer/batches');
$client->close(); $client->close();
var_dump($client); $data = json_decode($client->getBody(), TRUE);
if (json_last_error() != JSON_ERROR_NONE) {
return json_decode($client->getBody(), TRUE); return $client->getBody();
}
return $data;
} }
} }
-1
View File
@@ -42,7 +42,6 @@ trait WxV3PaymentTait
$rand = md5(random_bytes(32)); $rand = md5(random_bytes(32));
$time = time(); $time = time();
var_dump($body);
$message = sprintf("%s\n%s\n%d\n%s\n%s\n", $http_method, $canonical_url, $time, $rand, $body); $message = sprintf("%s\n%s\n%d\n%s\n%s\n", $http_method, $canonical_url, $time, $rand, $body);
$sign = $this->openssl_signature($message); $sign = $this->openssl_signature($message);