京东eclp回调测试

This commit is contained in:
苏尹岚
2020-03-09 14:30:16 +08:00
parent bd66b3e303
commit 88cae31e91
3 changed files with 25 additions and 2 deletions

View File

@@ -171,8 +171,8 @@ jd2AppKey = "7fb947624ff847ae94ff2f068cc99652"
jd2Secret = "1097abd7ef09427099b4922784af123a" jd2Secret = "1097abd7ef09427099b4922784af123a"
jdEclpAccessToken = "" jdEclpAccessToken = ""
jdEclpAppKey = "" jdEclpAppKey = "0D397F05CF11C51BCDCC81744680EBC3"
jdEclpAppSecret = "" jdEclpAppSecret = "f16a5e57ff4f4f428b702c40d2d4b933"
jdEclpRedirectUri = "" jdEclpRedirectUri = ""
elmIsProd = true elmIsProd = true

View File

@@ -0,0 +1,22 @@
package controllers
import (
"fmt"
"net/http"
"github.com/astaxie/beego"
)
type EclpController struct {
beego.Controller
}
func (c *EclpController) Msg() {
if c.Ctx.Input.Method() == http.MethodPost {
fmt.Println("testElcp", c.Ctx.Request.Body)
c.Data["json"] = c.Ctx.Request.Body
c.ServeJSON()
} else {
c.Abort("404")
}
}

View File

@@ -156,6 +156,7 @@ func init() {
beego.AutoRouter(&controllers.WXPayController{}) beego.AutoRouter(&controllers.WXPayController{})
beego.AutoRouter(&controllers.Djsw2Controller{}) beego.AutoRouter(&controllers.Djsw2Controller{})
beego.AutoRouter(&controllers.TongLianController{}) beego.AutoRouter(&controllers.TongLianController{})
beego.AutoRouter(&controllers.EclpController{})
// 如下都是用于检测存活的空接口 // 如下都是用于检测存活的空接口
beego.Any("/", func(ctx *beecontext.Context) { beego.Any("/", func(ctx *beecontext.Context) {