Compare commits
No commits in common. "80759ec111744e5ea04f85d2be57cd752e8515af" and "5c92a1fef72ac7e0261fe0c3faa607df125ff752" have entirely different histories.
80759ec111
...
5c92a1fef7
@ -167,26 +167,6 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
// 检查 订单信息 type是1说明既有主套餐又有增值服务
|
// 检查 订单信息 type是1说明既有主套餐又有增值服务
|
||||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||||
OrderNo: req.OutTradeNo,
|
OrderNo: req.OutTradeNo,
|
||||||
//金额校验
|
|
||||||
orderAmountInCents := int64(math.Round(float64(detail.OrderRecord.TotalAmount * 100)))
|
|
||||||
reqAmountInCents := int64(math.Round(float64(req.ProductAllPrice)))
|
|
||||||
if orderAmountInCents != reqAmountInCents {
|
|
||||||
fmt.Println("orderAmountInCents :", orderAmountInCents)
|
|
||||||
fmt.Println("reqAmountInCents :", reqAmountInCents)
|
|
||||||
fmt.Println("111111111111111111111111111111111111")
|
|
||||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
|
||||||
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
|
||||||
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
|
||||||
|
|
||||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
|
||||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
|
||||||
// 查询支付结果
|
|
||||||
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
|
||||||
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
|
||||||
})
|
})
|
||||||
if detailErr != nil {
|
if detailErr != nil {
|
||||||
fmt.Println("=============== antom创建支付,查询主订单信息报错:", detailErr)
|
fmt.Println("=============== antom创建支付,查询主订单信息报错:", detailErr)
|
||||||
|
Loading…
Reference in New Issue
Block a user