WIN-2308041133\Administrator 5 月之前
父節點
當前提交
b3680aaa20
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php

+ 3 - 2
vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php

@@ -79,12 +79,13 @@ class BaseClient
 
         $secretKey = $this->app->getKey($endpoint);
         $encryptMethod = Support\get_encrypt_method(Support\Arr::get($params, 'sign_type', 'MD5'), $secretKey);
-        $params['sign'] = Support\generate_sign($params, $secretKey, $encryptMethod);
         if ($endpoint == 'papay/entrustweb'){
             @file_put_contents("quanju3.txt", $params['notify_url'] . "-处理前的回调地址\r\n", 8);
             $params['notify_url'] = urlencode($params['notify_url']);
-            @file_put_contents("quanju3.txt", $params['nonce_str'] . "-encode处理后的回调地址\r\n", 8);
+            @file_put_contents("quanju3.txt", json_encode($params['nonce_str']) . "-encode处理后的回调地址\r\n", 8);
         }
+        $params['sign'] = Support\generate_sign($params, $secretKey, $encryptMethod);
+
 
         $options = array_merge([
             'body' => Support\XML::build($params),