京东增加回调测试
This commit is contained in:
@@ -217,15 +217,19 @@ func (c *DjswController) OrderAddTips() {
|
||||
c.orderStatus()
|
||||
}
|
||||
|
||||
// func (c *DjswController) OrderInfoChange() {
|
||||
// if c.Ctx.Input.Method() == http.MethodPost {
|
||||
// callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
|
||||
// callbackResponse = jd.OnOrderInfoChangeMsg(obj.(*jdapi.CallbackOrderInfoChangeMsg))
|
||||
// return callbackResponse
|
||||
// })
|
||||
// c.Data["json"] = c.transferResponse("OrderInfoChange", callbackResponse)
|
||||
// c.ServeJSON()
|
||||
// } else {
|
||||
// c.Abort("404")
|
||||
// }
|
||||
// }
|
||||
|
||||
func (c *DjswController) OrderInfoChange() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
|
||||
callbackResponse = jd.OnOrderInfoChangeMsg(obj.(*jdapi.CallbackOrderInfoChangeMsg))
|
||||
return callbackResponse
|
||||
})
|
||||
c.Data["json"] = c.transferResponse("OrderInfoChange", callbackResponse)
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
c.orderStatus()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user