This commit is contained in:
richboo111
2022-08-01 15:58:33 +08:00
parent 5213725aeb
commit f98f900550

View File

@@ -90,6 +90,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, app
order = &model.Order{
OrderID: orderID,
PayPrice: orderInfo.PayPrice,
UserID: orderInfo.UserID,
}
payHandler = &financial.PayHandler{
PayType: payType,
@@ -119,7 +120,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, app
globals.SugarLogger.Debug("order.PayMethod after=========================", order.PayMethod)
globals.SugarLogger.Debugf("pay begin……")
//err = dao.GetEntity(db, order, "OrderID")
if order.ID == 0 {
if order.OrderID == "" {
return result, fmt.Errorf("未找到此订单!")
}
payHandler.Order = order
@@ -142,7 +143,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, app
}
err = payHandler.CreatePay(txDB, appId)
globals.SugarLogger.Debug("errrrrr=========================", err)
dao.Commit(db, txDB)
//dao.Commit(db, txDB)
globals.SugarLogger.Debug("the last step of this program,return err……", err)
globals.SugarLogger.Debugf("result : %v", utils.Format4Output(payHandler.WxPayParam, false))
return payHandler.WxPayParam, err