This commit is contained in:
commit
551b9f10ee
|
@ -0,0 +1,23 @@
|
||||||
|
package controller
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
"service/bizcommon/util"
|
||||||
|
"service/library/logger"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ApplepayCallback(ctx *gin.Context) {
|
||||||
|
var bodyParam map[string]interface{}
|
||||||
|
buf, err := ioutil.ReadAll(ctx.Request.Body)
|
||||||
|
logger.Info("ApplepayCallback body: %v", string(buf))
|
||||||
|
err = json.Unmarshal(buf, &bodyParam)
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("arg parse fail: %v", err)
|
||||||
|
ReplyJsonError(ctx, http.StatusBadRequest, "参数解析失败")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
logger.Info("ApplepayCallback param: %v", util.ToJson(bodyParam))
|
||||||
|
}
|
|
@ -295,6 +295,7 @@ func Init(r *gin.Engine) {
|
||||||
extVasPayGroup.POST("alipay_callback", AlipayCallback)
|
extVasPayGroup.POST("alipay_callback", AlipayCallback)
|
||||||
extVasPayGroup.POST("wxpay_callback", WxpayCallback)
|
extVasPayGroup.POST("wxpay_callback", WxpayCallback)
|
||||||
extVasPayGroup.POST("yeepay_callback", YeepayCallback)
|
extVasPayGroup.POST("yeepay_callback", YeepayCallback)
|
||||||
|
extVasPayGroup.POST("applepay_callback", ApplepayCallback)
|
||||||
|
|
||||||
opVasPayGroup := r.Group("/op/vas", PrepareOp())
|
opVasPayGroup := r.Group("/op/vas", PrepareOp())
|
||||||
opVasPayGroup.POST("create_order", middleware.JSONParamValidator(vasproto.OpCreateOrderReq{}), OpCreateOrder)
|
opVasPayGroup.POST("create_order", middleware.JSONParamValidator(vasproto.OpCreateOrderReq{}), OpCreateOrder)
|
||||||
|
|
Loading…
Reference in New Issue