Compare commits
No commits in common. "eae408d711695a17a8303afcafbe85b78a4f743f" and "e0f3bf742bfc7b94e60e23e8f449048c8d2f96f9" have entirely different histories.
eae408d711
...
e0f3bf742b
@ -12,7 +12,6 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/bundle/common"
|
"fonchain-fiee/pkg/service/bundle/common"
|
||||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||||
"io"
|
"io"
|
||||||
"math"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
@ -54,10 +53,9 @@ func CreateStripeCheckoutSession(c *gin.Context) {
|
|||||||
fmt.Println("detail.OrderRecord.TotalAmount*100 :", detail.OrderRecord.TotalAmount*100)
|
fmt.Println("detail.OrderRecord.TotalAmount*100 :", detail.OrderRecord.TotalAmount*100)
|
||||||
|
|
||||||
//金额校验
|
//金额校验
|
||||||
orderAmountInCents := int64(math.Round(float64(detail.OrderRecord.TotalAmount * 100)))
|
if detail.OrderRecord.TotalAmount*100 != float32(req.ProductAllPrice) {
|
||||||
reqAmountInCents := int64(math.Round(float64(req.ProductAllPrice)))
|
fmt.Println("11111111111111111111111111111111111111111111111")
|
||||||
if orderAmountInCents != reqAmountInCents {
|
fmt.Println("金额错误11111111111111111111")
|
||||||
fmt.Println("111111111111111111111111111111111111")
|
|
||||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
service.Error(c, errors.New(common.InvalidOrderAmount))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user