This commit is contained in:
richboo111
2022-07-28 14:10:39 +08:00
parent 5933a585cd
commit c5e0474fd6

View File

@@ -161,12 +161,15 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, restPrice, payType int
}
orderInfo.Status = AlreadyPay
}
}
if restPrice != 0 {
//需支付部分
//restPrice := orderInfo.PayPrice - userBill.AccountBalance
globals.SugarLogger.Debug("进入混合支付部分")
orderInfo.PayPrice = restPrice
globals.SugarLogger.Debug("orderInfo.PayPrice=================", orderInfo.PayPrice)
_, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID)
globals.SugarLogger.Debug("err=================", err)
if err != nil {
return "微信支付失败:", err
}
@@ -185,7 +188,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, restPrice, payType int
}
return "混合支付成功", err
}
}
dao.Commit(db, txDB)
}
return "", err