fix
This commit is contained in:
parent
64f506cab4
commit
a29420236b
|
@ -5,6 +5,7 @@ import (
|
||||||
"service/api/errcode"
|
"service/api/errcode"
|
||||||
vasproto "service/api/proto/vas/proto"
|
vasproto "service/api/proto/vas/proto"
|
||||||
"service/app/mix/service"
|
"service/app/mix/service"
|
||||||
|
"service/bizcommon/common"
|
||||||
"service/bizcommon/util"
|
"service/bizcommon/util"
|
||||||
"service/library/logger"
|
"service/library/logger"
|
||||||
)
|
)
|
||||||
|
@ -12,6 +13,9 @@ import (
|
||||||
// 获取充值商品
|
// 获取充值商品
|
||||||
func GetCoinsProductList(ctx *gin.Context) {
|
func GetCoinsProductList(ctx *gin.Context) {
|
||||||
req := ctx.MustGet("client_req").(*vasproto.GetCoinsProductListReq)
|
req := ctx.MustGet("client_req").(*vasproto.GetCoinsProductListReq)
|
||||||
|
if req.Channel == "h5" {
|
||||||
|
req.DevType = common.DeviceTypeH5
|
||||||
|
}
|
||||||
data, ec := service.DefaultService.GetCoinsProductList(ctx, req)
|
data, ec := service.DefaultService.GetCoinsProductList(ctx, req)
|
||||||
if ec != errcode.ErrCodeVasSrvOk {
|
if ec != errcode.ErrCodeVasSrvOk {
|
||||||
logger.Error("GetCoinsProductList fail, req: %v, ec: %v", util.ToJson(req), ec)
|
logger.Error("GetCoinsProductList fail, req: %v, ec: %v", util.ToJson(req), ec)
|
||||||
|
|
|
@ -79,6 +79,7 @@ func (c *AlipayClient) AppPay(ctx context.Context, param *AppPayParam) (alipayAp
|
||||||
"subject": param.Subject,
|
"subject": param.Subject,
|
||||||
"total_amount": fmt.Sprintf("%.2f", float64(param.TotalAmount)/100.0),
|
"total_amount": fmt.Sprintf("%.2f", float64(param.TotalAmount)/100.0),
|
||||||
"time_expire": time.Now().Add(time.Second * time.Duration(param.TimeOutSeconds)).Format("2006-01-02 15:04:05"),
|
"time_expire": time.Now().Add(time.Second * time.Duration(param.TimeOutSeconds)).Format("2006-01-02 15:04:05"),
|
||||||
|
"notify_url": c.NotifyUrl,
|
||||||
}
|
}
|
||||||
alipayAppParamStr, err = c.TradeAppPay(ctx, bm)
|
alipayAppParamStr, err = c.TradeAppPay(ctx, bm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -105,6 +106,7 @@ func (c *AlipayClient) WapPay(ctx context.Context, param *WapPayParam) (alipayWa
|
||||||
"subject": param.Subject,
|
"subject": param.Subject,
|
||||||
"total_amount": fmt.Sprintf("%.2f", float64(param.TotalAmount)/100.0),
|
"total_amount": fmt.Sprintf("%.2f", float64(param.TotalAmount)/100.0),
|
||||||
"time_expire": time.Now().Add(time.Second * time.Duration(param.TimeOutSeconds)).Format("2006-01-02 15:04:05"),
|
"time_expire": time.Now().Add(time.Second * time.Duration(param.TimeOutSeconds)).Format("2006-01-02 15:04:05"),
|
||||||
|
"notify_url": c.NotifyUrl,
|
||||||
}
|
}
|
||||||
alipayWapParamStr, err = c.TradeWapPay(ctx, bm)
|
alipayWapParamStr, err = c.TradeWapPay(ctx, bm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue