提交 5059cbd3 编写于 作者: chenzhehao's avatar chenzhehao

微信验证接口增加日志输出

上级 1859458b
...@@ -45,10 +45,12 @@ public class CoreServiceImpl implements CoreService { ...@@ -45,10 +45,12 @@ public class CoreServiceImpl implements CoreService {
String nonce = request.getParameter("nonce"); String nonce = request.getParameter("nonce");
// 随机字符串 // 随机字符串
String echostr = request.getParameter("echostr"); String echostr = request.getParameter("echostr");
logger.info("微信验证接口信息signature:" + signature + " timestamp:" + timestamp + " nonce:" + nonce + " echostr:" + echostr);
// 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败 // 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败
if (CommonUtils.checkSignature(signature, timestamp, nonce)) { if (CommonUtils.checkSignature(signature, timestamp, nonce)) {
return echostr; return echostr;
} }
logger.error("微信验证接口异常" );
return null; return null;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册