|
|
@@ -483,6 +483,12 @@ class API extends AbstractAPI
|
|
|
$params = array_filter($params);
|
|
|
@file_put_contents('quanju2.txt', json_encode($this->getSignkey($api))."-微信支付失败9\r\n", 8);
|
|
|
ksort($params);
|
|
|
+ foreach ($params as $key => $value) {
|
|
|
+ $cleanValue = preg_replace('/\s+/', ' ', trim($value));
|
|
|
+ if ($value !== $cleanValue) {
|
|
|
+ file_put_contents('quanju2.txt', "参数 {$key} 包含隐藏字符\n原始: '" . $value . "'\n清理: '" . $cleanValue . "'\n", FILE_APPEND);
|
|
|
+ }
|
|
|
+ }
|
|
|
$params['sign'] = generate_sign($params, $this->getSignkey($api), 'md5');
|
|
|
@file_put_contents('quanju2.txt', json_encode($params)."-微信支付失败7\r\n", 8);
|
|
|
$options = array_merge([
|