diff --git a/controller/topup.go b/controller/topup.go index 438c198..37f6c88 100644 --- a/controller/topup.go +++ b/controller/topup.go @@ -111,9 +111,13 @@ func RequestEpay(c *gin.Context) { c.JSON(200, gin.H{"message": "error", "data": "拉起支付失败"}) return } + amount := req.Amount + if !common.DisplayInCurrencyEnabled { + amount = amount / int(common.QuotaPerUnit) + } topUp := &model.TopUp{ UserId: id, - Amount: req.Amount, + Amount: amount, Money: payMoney, TradeNo: "A" + tradeNo, CreateTime: time.Now().Unix(),