Files
rootandClaude Opus 5.5 7974a42301 Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 11:07:42 +08:00

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")
}