This commit is contained in:
lwl0608 2023-12-29 15:03:50 +08:00
parent 64f506cab4
commit a29420236b
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"service/api/errcode"
vasproto "service/api/proto/vas/proto"
"service/app/mix/service"
"service/bizcommon/common"
"service/bizcommon/util"
"service/library/logger"
)
@ -12,6 +13,9 @@ import (
// 获取充值商品
func GetCoinsProductList(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*vasproto.GetCoinsProductListReq)
if req.Channel == "h5" {
req.DevType = common.DeviceTypeH5
}
data, ec := service.DefaultService.GetCoinsProductList(ctx, req)
if ec != errcode.ErrCodeVasSrvOk {
logger.Error("GetCoinsProductList fail, req: %v, ec: %v", util.ToJson(req), ec)

View File

@ -79,6 +79,7 @@ func (c *AlipayClient) AppPay(ctx context.Context, param *AppPayParam) (alipayAp
"subject": param.Subject,
"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"),
"notify_url": c.NotifyUrl,
}
alipayAppParamStr, err = c.TradeAppPay(ctx, bm)
if err != nil {
@ -105,6 +106,7 @@ func (c *AlipayClient) WapPay(ctx context.Context, param *WapPayParam) (alipayWa
"subject": param.Subject,
"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"),
"notify_url": c.NotifyUrl,
}
alipayWapParamStr, err = c.TradeWapPay(ctx, bm)
if err != nil {