mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-19 08:56:37 +08:00
feat: 钱包兼容非货币形式显示额度
This commit is contained in:
parent
bc9cfa5da0
commit
3db64afc7f
@ -111,9 +111,13 @@ func RequestEpay(c *gin.Context) {
|
|||||||
c.JSON(200, gin.H{"message": "error", "data": "拉起支付失败"})
|
c.JSON(200, gin.H{"message": "error", "data": "拉起支付失败"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
amount := req.Amount
|
||||||
|
if !common.DisplayInCurrencyEnabled {
|
||||||
|
amount = amount / int(common.QuotaPerUnit)
|
||||||
|
}
|
||||||
topUp := &model.TopUp{
|
topUp := &model.TopUp{
|
||||||
UserId: id,
|
UserId: id,
|
||||||
Amount: req.Amount,
|
Amount: amount,
|
||||||
Money: payMoney,
|
Money: payMoney,
|
||||||
TradeNo: "A" + tradeNo,
|
TradeNo: "A" + tradeNo,
|
||||||
CreateTime: time.Now().Unix(),
|
CreateTime: time.Now().Unix(),
|
||||||
|
Loading…
Reference in New Issue
Block a user