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.
kashangwl/api.buy.notify.gin.go

27 lines
1.6 KiB

2 years ago
package kashangwl
import (
"context"
"github.com/gin-gonic/gin"
)
2 years ago
// ResponseApiBuyNotifyGin 购买商品 - 回调通知 - 请求参数
2 years ago
type ResponseApiBuyNotifyGin struct {
2 years ago
OrderId string `form:"order_id" json:"order_id" xml:"order_id" uri:"order_id" binding:"required"` // 订单编号
2 years ago
OuterOrderId string `form:"outer_order_id" json:"outer_order_id" xml:"outer_order_id" uri:"outer_order_id" binding:"omitempty"` // 商户订单号
ProductId int `form:"product_id" json:"product_id" xml:"product_id" uri:"product_id" binding:"omitempty"` // 商品编号
Quantity int `form:"quantity" json:"quantity" xml:"quantity" uri:"quantity" binding:"required"` // 购买数量
State int `form:"state" json:"state" xml:"state" uri:"state" binding:"required"` // 订单状态100等待发货101正在充值200交易成功500交易失败501未知状态
StateInfo string `form:"state_info" json:"state_info" xml:"state_info" uri:"state_info" binding:"omitempty"` // 状态信息
CreatedAt string `form:"created_at" json:"created_at" xml:"created_at" uri:"created_at" binding:"required"` // 购买数量
}
// ApiBuyNotifyGin 购买商品 - 回调通知
// http://doc.cqmeihu.cn/sales/order-status-notify.html
2 years ago
func (c *Client) ApiBuyNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson ResponseApiBuyNotifyGin, err error) {
2 years ago
2 years ago
err = ginCtx.ShouldBind(&validateJson)
2 years ago
return validateJson, err
}