测试京东新回调
This commit is contained in:
@@ -29,6 +29,16 @@ func (c *DjswController) handleMsg(isNeedDecode bool, handler func(*jdapi.API, u
|
||||
callbackResponse = jdapi.Err2CallbackResponse(fmt.Errorf("没有匹配的token,非法请求"), "")
|
||||
}
|
||||
}
|
||||
if beego.BConfig.RunMode == "beta" {
|
||||
if callbackMsg, response := jdapi.GetCallbackMsg2(getUsefulRequest(c.Ctx)); response == nil {
|
||||
if jdAPI := jd.GetAPIByToken(callbackMsg.Token); jdAPI != nil {
|
||||
isValid := jdAPI.CheckCallbackValidation2(callbackMsg)
|
||||
globals.SugarLogger.Debugf("handleMsg isValid:%t", isValid)
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("handleMsg failed, can not find api for:%s", callbackMsg.Token)
|
||||
}
|
||||
}
|
||||
}
|
||||
return callbackResponse
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user