33 lines
903 B
Go
33 lines
903 B
Go
package web_recharge
|
|
|
|
import (
|
|
"net/http"
|
|
"videoweb/pub/common"
|
|
"videoweb/pub/common/srvdef"
|
|
srv_recharge "videoweb/web/service/srv_recharge"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// PayCenterBillCallback 嘉华支付中心支付回调
|
|
// @Tags 支付回调
|
|
// @Summary 嘉华支付回调通知(内部接口,无需鉴权)
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param param body srv_recharge.BillCallbackParam true "回调参数"
|
|
// @Success 200 {string} string "success"
|
|
// @Router /api/web/third/paycenter/bill/callback [POST]
|
|
func PayCenterBillCallback(ctx *gin.Context) {
|
|
var req srv_recharge.BillCallbackParam
|
|
if err := ctx.ShouldBind(&req); err != nil {
|
|
common.ServerJSON(ctx, srvdef.ErrParamError, err.Error())
|
|
return
|
|
}
|
|
|
|
if serr := srv_recharge.OnPayCenterCallback(ctx, &req); serr != nil {
|
|
ctx.String(http.StatusBadRequest, "fail")
|
|
return
|
|
}
|
|
ctx.String(http.StatusOK, "success")
|
|
}
|