|
|
@@ -27,10 +27,10 @@ public class WeChatController {
|
|
|
@RequestParam("echostr") String echostr) throws AesException {
|
|
|
|
|
|
log.info("收到微信服务器验证请求 - signature: {}, timestamp: {}, nonce: {}",
|
|
|
- weChatProperties.getToken(), timestamp, nonce);
|
|
|
+ signature, timestamp, nonce);
|
|
|
|
|
|
// 校验签名
|
|
|
- String sha1 = SHA1.getSHA1("", timestamp, nonce);
|
|
|
+ String sha1 = SHA1.getSHA1(weChatProperties.getToken(), timestamp, nonce);
|
|
|
if (sha1.equals(echostr)) {
|
|
|
log.info("微信服务器验证成功");
|
|
|
return echostr;
|