在epayPayment和CryptoSaaSPayment方法中,对转换后的金额进行四舍五入保留两位小数处理,确保支付金额精度准确
This commit is contained in:
@@ -275,6 +275,7 @@ func (l *PurchaseCheckoutLogic) epayPayment(config *payment.Payment, info *order
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
amount = math.Round(amount*100) / 100
|
||||||
|
|
||||||
// Build notification URL for payment status callbacks
|
// Build notification URL for payment status callbacks
|
||||||
notifyUrl := ""
|
notifyUrl := ""
|
||||||
@@ -317,6 +318,7 @@ func (l *PurchaseCheckoutLogic) CryptoSaaSPayment(config *payment.Payment, info
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
amount = math.Round(amount*100) / 100
|
||||||
|
|
||||||
// Build notification URL for payment status callbacks
|
// Build notification URL for payment status callbacks
|
||||||
notifyUrl := ""
|
notifyUrl := ""
|
||||||
|
|||||||
Reference in New Issue
Block a user