|
@@ -30,9 +30,9 @@ public class WeChatController {
|
|
|
signature, timestamp, nonce, echostr);
|
|
signature, timestamp, nonce, echostr);
|
|
|
|
|
|
|
|
// 校验签名
|
|
// 校验签名
|
|
|
- String sha1 = SHA1.getSHA1(weChatProperties.getToken(), timestamp, nonce).trim();
|
|
|
|
|
|
|
+ String sha1 = SHA1.getSHA1(weChatProperties.getToken(), timestamp, nonce);
|
|
|
log.info("本地生成微信服务器签名:{}", sha1);
|
|
log.info("本地生成微信服务器签名:{}", sha1);
|
|
|
- if (sha1.equals(echostr.trim())) {
|
|
|
|
|
|
|
+ if (sha1.equals(signature)) {
|
|
|
log.info("微信服务器验证成功");
|
|
log.info("微信服务器验证成功");
|
|
|
return echostr;
|
|
return echostr;
|
|
|
} else {
|
|
} else {
|