京东eclp回调测试
This commit is contained in:
@@ -171,8 +171,8 @@ jd2AppKey = "7fb947624ff847ae94ff2f068cc99652"
|
|||||||
jd2Secret = "1097abd7ef09427099b4922784af123a"
|
jd2Secret = "1097abd7ef09427099b4922784af123a"
|
||||||
|
|
||||||
jdEclpAccessToken = ""
|
jdEclpAccessToken = ""
|
||||||
jdEclpAppKey = ""
|
jdEclpAppKey = "0D397F05CF11C51BCDCC81744680EBC3"
|
||||||
jdEclpAppSecret = ""
|
jdEclpAppSecret = "f16a5e57ff4f4f428b702c40d2d4b933"
|
||||||
jdEclpRedirectUri = ""
|
jdEclpRedirectUri = ""
|
||||||
|
|
||||||
elmIsProd = true
|
elmIsProd = true
|
||||||
|
|||||||
22
controllers/eclp_callback.go
Normal file
22
controllers/eclp_callback.go
Normal 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user