From b8960deda53e09de25b24f7f28a5586a88d3d1c9 Mon Sep 17 00:00:00 2001 From: xl Date: Tue, 7 Nov 2023 16:09:40 +0800 Subject: [PATCH] Default Changelist --- wchat/wx/V3/WxV3PaymentTait.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wchat/wx/V3/WxV3PaymentTait.php b/wchat/wx/V3/WxV3PaymentTait.php index eb1833a..8275b27 100644 --- a/wchat/wx/V3/WxV3PaymentTait.php +++ b/wchat/wx/V3/WxV3PaymentTait.php @@ -39,9 +39,11 @@ trait WxV3PaymentTait */ public function signature(string $http_method, string $canonical_url, string $body = ''): string { - $rand = md5(random_bytes(32)); - $time = time(); - $message = sprintf("%s\n%s\n%d\n%s\n[]\n", $http_method, $canonical_url, $time, $rand); + $rand = md5(random_bytes(32)); + $time = time(); + + var_dump($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);