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);