Default Changelist

This commit is contained in:
xl
2023-11-07 15:39:46 +08:00
parent a876b780f5
commit 459d298983
+3 -1
View File
@@ -39,7 +39,9 @@ trait WxV3PaymentTait
*/
public function signature(string $http_method, string $canonical_url, string $body = ''): string
{
$message = $http_method . "\n" . $canonical_url . "\n" . ($time = time()) . "\n" . ($rand = md5(random_bytes(32))) . "\n" . $body . "\n";
$rand = md5(random_bytes(32));
$time = time();
$message = sprintf("%s\n%s\n%d\n%s\n\n", $http_method, $canonical_url, $time, $rand);
$sign = $this->openssl_signature($message);