DengBiao hace 7 meses
padre
commit
7a5ad5a570
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      app/customer/svc/svc_pay.go

+ 5
- 1
app/customer/svc/svc_pay.go Ver fichero

@@ -215,6 +215,10 @@ func BuyPackageForWx(c *gin.Context, req md.BuyPackageReq) (outTradeNo, total st

sysCfg := sysCfgDb.SysCfgFindWithDb(enum2.WxAppletAppId, enum2.WxSpAppId, enum2.WxSpMchId, enum2.WxAppletAppId, enum2.WxJsapiPayNotifyUrl)
fmt.Println(int64(math.Round(totalPrice * 100)))
openId := c.GetHeader("open_id")
if openId == "" {
openId = user.OpenId
}
result, _, err := wxSvc.Prepay(c,
jsapi.PrepayRequest{
SpAppid: core.String(sysCfg[enum2.WxSpAppId]),
@@ -232,7 +236,7 @@ func BuyPackageForWx(c *gin.Context, req md.BuyPackageReq) (outTradeNo, total st
},
Payer: &jsapi.Payer{
//SpOpenid: core.String("oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"),
SubOpenid: core.String(user.OpenId),
SubOpenid: core.String(openId),
},
},
)


Cargando…
Cancelar
Guardar