- ebai callback.
This commit is contained in:
@@ -1,10 +1,26 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
_ "git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
|
||||
"net/http"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
type EbaiController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
func (c *EbaiController) Msg() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
obj, callbackResponse := api.EbaiAPI.GetCallbackMsg(c.Ctx.Request)
|
||||
if callbackResponse == nil {
|
||||
callbackResponse = ebai.OnCallbackMsg(obj)
|
||||
}
|
||||
c.Data["json"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user