Skip to content

Commit

Permalink
修复V3接口GET携带参数时验签失败 (#37)
Browse files Browse the repository at this point in the history
* 修复V3接口GET携带参数时验签失败

* Update SDKV3.php
  • Loading branch information
BadmintonCode authored Sep 2, 2024
1 parent 43aacd4 commit 4b846d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Weixin/SDKV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function parseSignData($data)
$params = $data['params'];

return $params->_method . "\n"
. '/' . $params->_apiMethod . "\n"
. '/' . $params->_apiMethod . ($params->_method == 'GET' && $data['data'] ? '?' . http_build_query($data['data']) : '') . "\n"
. $data['timestamp'] . "\n"
. $data['nonce_str'] . "\n"
. (\in_array($params->_method, ['POST', 'PUT']) ? json_encode($data['data']) : '') . "\n";
Expand Down

0 comments on commit 4b846d5

Please sign in to comment.