You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wikeyun/rest.recharge.push_order.no...

39 lines
3.1 KiB

2 years ago
package wikeyun
import (
"context"
"github.com/gin-gonic/gin"
)
type ResponseRestRechargePushOrderNotifyGin struct {
Status int `form:"status" json:"status" xml:"status" uri:"status" binding:"omitempty"` // 状态 订单状态 0 待支付 1 已付 充值中 2充值成功 3充值失败 需要退款 4退款成功 5已超时 6待充值 7 已匹配 8 已存单 9 已取消 10返销 11部分到账
Mobile string `form:"mobile" json:"mobile" xml:"mobile" uri:"mobile" binding:"required"` // 充值手机号
OrderNo string `form:"order_no" json:"order_no" xml:"order_no" uri:"order_no" binding:"required"` // 第三方单号
OrderNumber string `form:"order_number" json:"order_number" xml:"order_number" uri:"order_number" binding:"required"` // 微客云平台单号
Amount string `form:"amount" json:"amount" xml:"amount" uri:"amount" binding:"required"` // 充值金额如50100200可选
Fanli float64 `form:"fanli" json:"fanli" xml:"fanli" uri:"fanli" binding:"required"` // 返利金额
CostPrice float64 `form:"cost_price" json:"cost_price" xml:"cost_price" uri:"cost_price" binding:"required"` // 成本价格
Sign string `form:"sign" json:"sign" xml:"sign" uri:"sign" binding:"omitempty"` // 加密内容
}
// RestRechargePushOrderNotifyGin 话费充值推送 - 回调通知
// https://open.wikeyun.cn/#/document/1/article/302
func (c *Client) RestRechargePushOrderNotifyGin(ctx context.Context, ginCtx *gin.Context) (ResponseRestRechargePushOrderNotifyGin, error) {
// 声明接收的变量
var validateJson struct {
Status int `form:"status" json:"status" xml:"status" uri:"status" binding:"omitempty"` // 状态 订单状态 0 待支付 1 已付 充值中 2充值成功 3充值失败 需要退款 4退款成功 5已超时 6待充值 7 已匹配 8 已存单 9 已取消 10返销 11部分到账
Mobile string `form:"mobile" json:"mobile" xml:"mobile" uri:"mobile" binding:"required"` // 充值手机号
OrderNo string `form:"order_no" json:"order_no" xml:"order_no" uri:"order_no" binding:"required"` // 第三方单号
OrderNumber string `form:"order_number" json:"order_number" xml:"order_number" uri:"order_number" binding:"required"` // 微客云平台单号
Amount string `form:"amount" json:"amount" xml:"amount" uri:"amount" binding:"required"` // 充值金额如50100200可选
Fanli float64 `form:"fanli" json:"fanli" xml:"fanli" uri:"fanli" binding:"required"` // 返利金额
CostPrice float64 `form:"cost_price" json:"cost_price" xml:"cost_price" uri:"cost_price" binding:"required"` // 成本价格
Sign string `form:"sign" json:"sign" xml:"sign" uri:"sign" binding:"omitempty"` // 加密内容
}
err := ginCtx.ShouldBind(&validateJson)
return validateJson, err
}