- 京东回调,非生产环境一定返回成功
This commit is contained in:
@@ -145,6 +145,9 @@ func (c *DjswController) StoreCrud() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *DjswController) transferResponse(inCallbackResponse *jdapi.CallbackResponse) (outCallbackResponse *jdapi.CallbackResponse) {
|
func (c *DjswController) transferResponse(inCallbackResponse *jdapi.CallbackResponse) (outCallbackResponse *jdapi.CallbackResponse) {
|
||||||
|
if globals.IsCallbackAlwaysReturnSuccess() {
|
||||||
|
return jdapi.SuccessResponse
|
||||||
|
}
|
||||||
if inCallbackResponse == nil {
|
if inCallbackResponse == nil {
|
||||||
return jdapi.SuccessResponse
|
return jdapi.SuccessResponse
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,3 +67,7 @@ func Init() {
|
|||||||
WeimobCallbackURL = beego.AppConfig.DefaultString("weimobCallbackURL", "")
|
WeimobCallbackURL = beego.AppConfig.DefaultString("weimobCallbackURL", "")
|
||||||
WeimobStateSecret = beego.AppConfig.DefaultString("weimobStateSecret", "")
|
WeimobStateSecret = beego.AppConfig.DefaultString("weimobStateSecret", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsCallbackAlwaysReturnSuccess() bool {
|
||||||
|
return beego.BConfig.RunMode == "beta"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user