Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
4af1ac9da3
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      app/customer/svc/svc_pay.go

+ 7
- 1
app/customer/svc/svc_pay.go View File

@@ -215,7 +215,7 @@ func BuyPackageForWx(c *gin.Context, req md.BuyPackageReq) (outTradeNo, prepayId
NotifyUrl: core.String(sysCfg[enum2.WxJsapiPayNotifyUrl]), NotifyUrl: core.String(sysCfg[enum2.WxJsapiPayNotifyUrl]),
Amount: &jsapi.Amount{ Amount: &jsapi.Amount{
Currency: core.String("CNY"), Currency: core.String("CNY"),
Total: core.Int64(utils.StrToInt64(total) * 100),
Total: core.Int64(int64(totalPrice * 100)),
}, },
Payer: &jsapi.Payer{ Payer: &jsapi.Payer{
//SpOpenid: core.String("oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"), //SpOpenid: core.String("oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"),
@@ -224,6 +224,12 @@ func BuyPackageForWx(c *gin.Context, req md.BuyPackageReq) (outTradeNo, prepayId
}, },
) )


fmt.Println(">>>>>>>>>>>", core.Int64(utils.StrToInt64(total)*100))
if err != nil {
_ = session.Rollback()
return
}

//5、插入订单记录 //5、插入订单记录
now := time.Now() now := time.Now()
centralKitchenForSchoolPackageOrd := db.CentralKitchenForSchoolPackageOrd{} centralKitchenForSchoolPackageOrd := db.CentralKitchenForSchoolPackageOrd{}


Loading…
Cancel
Save