|
@@ -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{} |
|
|