redirect url
This commit is contained in:
parent
1920418c31
commit
dcf2057a86
|
@ -56,6 +56,7 @@ type CreateOrderReq struct {
|
|||
Operator string `json:"operator"` // 操作人
|
||||
CustomCoins int64 `json:"custom_coins"` // 自定义金币数,product_id:"h5_custom_coin"
|
||||
WechatAuthCode string `json:"wechat_auth_code"` // 微信auth_code
|
||||
RedirectUrl string `json:"redirect_url"` // redirect_url
|
||||
|
||||
CalcPrice int64 // 计算价格
|
||||
Uid int64 // 关联mid
|
||||
|
@ -149,6 +150,7 @@ type H5DirectUnlockWechatReq struct {
|
|||
Uid int64 `json:"uid"` // 主播id
|
||||
PayType string `json:"pay_type"` // 支付类型
|
||||
WechatAuthCode string `json:"wechat_auth_code"` // 微信auth_code
|
||||
RedirectUrl string `json:"redirect_url"` // redirect_url
|
||||
}
|
||||
|
||||
type H5DirectUnlockWechatData struct {
|
||||
|
|
|
@ -159,6 +159,7 @@ type ZoneCreateOrderReq struct {
|
|||
PayType string `json:"pay_type"` // 支付方式
|
||||
From string `json:"from"` // 来源
|
||||
WechatAuthCode string `json:"wechat_auth_code"` // 微信auth_code
|
||||
RedirectUrl string `json:"redirect_url"` // redirect_url
|
||||
}
|
||||
|
||||
type ZoneCreateOrderData struct {
|
||||
|
|
|
@ -306,6 +306,7 @@ func (v *Vas) CreateOrder(ctx *gin.Context, req *vasproto.CreateOrderReq) (data
|
|||
Description: product.Subject,
|
||||
OutTradeNo: orderId,
|
||||
TotalAmount: product.RealPrice,
|
||||
RedirectUrl: req.RedirectUrl,
|
||||
PayWay: yeepaycli.YeepayWayH5,
|
||||
PayChannel: yeepaycli.YeepayChannelAlipay,
|
||||
Ip: ctx.ClientIP(),
|
||||
|
@ -328,6 +329,7 @@ func (v *Vas) CreateOrder(ctx *gin.Context, req *vasproto.CreateOrderReq) (data
|
|||
Description: product.Subject,
|
||||
OutTradeNo: orderId,
|
||||
TotalAmount: product.RealPrice,
|
||||
RedirectUrl: req.RedirectUrl,
|
||||
PayWay: yeepaycli.YeepayWayH5,
|
||||
PayChannel: yeepaycli.YeepayChannelWxpay,
|
||||
Ip: ctx.ClientIP(),
|
||||
|
@ -1156,6 +1158,7 @@ func (v *Vas) H5DirectUnlockWechat(ctx *gin.Context, req *vasproto.H5DirectUnloc
|
|||
CalcPrice: uVas.GetH5WechatCoinPrice() * 10,
|
||||
Uid: uid,
|
||||
ReturnUrl: "https://tiefen.fun/purchased",
|
||||
RedirectUrl: req.RedirectUrl,
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("CreateOrder fail, req: %v, err: %v", util.ToJson(req), err)
|
||||
|
|
|
@ -252,6 +252,7 @@ func (v *Vas) ZoneCreateOrder(ctx *gin.Context, req *vasproto.ZoneCreateOrderReq
|
|||
Uid: uid,
|
||||
Oid1: fmt.Sprintf("%d", req.Zid),
|
||||
Oid2: oid2,
|
||||
RedirectUrl: req.RedirectUrl,
|
||||
}
|
||||
createOrderData, err := v.CreateOrder(ctx, createOrderReq)
|
||||
if err != nil {
|
||||
|
|
|
@ -139,6 +139,9 @@ func (c *YeepayClient) AggPay(ctx context.Context, param *AggPayParam) (resp *Ag
|
|||
req.AddParam("channel", param.PayChannel)
|
||||
req.AddParam("scene", "OFFLINE")
|
||||
req.AddParam("userIp", param.Ip)
|
||||
if len(param.RedirectUrl) > 0 {
|
||||
req.AddParam("redirectUrl", param.RedirectUrl)
|
||||
}
|
||||
|
||||
respMeta, err := c.client.Request(req)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue