log info
This commit is contained in:
parent
c0d9ac7420
commit
2faf742410
|
@ -348,13 +348,13 @@ func (q *App) Callback(ctx *gin.Context) {
|
||||||
sign := wutil.Signature(ctx.Query("timestamp"), ctx.Query("echostr"),
|
sign := wutil.Signature(ctx.Query("timestamp"), ctx.Query("echostr"),
|
||||||
ctx.Query("nonce"), wechatConfig.Token)
|
ctx.Query("nonce"), wechatConfig.Token)
|
||||||
if sign != ctx.Query("msg_signature") {
|
if sign != ctx.Query("msg_signature") {
|
||||||
log.Errorf("sign error forcheck config")
|
log.Errorf("sign error forcheck config! token[%s]", wechatConfig.Token)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, resp, err := wutil.DecryptMsg(wechatConfig.AppID, ctx.Query("echostr"), wechatConfig.EncodingAESKey)
|
_, resp, err := wutil.DecryptMsg(wechatConfig.AppID, ctx.Query("echostr"), wechatConfig.EncodingAESKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("DecryptMsg failed! error:%s", err.Error())
|
log.Errorf("DecryptMsg failed! appid[%s] aeskey[%s] error:%s ", wechatConfig.AppID, wechatConfig.EncodingAESKey, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.Data(http.StatusOK, "Content-type: text/plain", resp)
|
ctx.Data(http.StatusOK, "Content-type: text/plain", resp)
|
||||||
|
|
Loading…
Reference in New Issue