This commit is contained in:
苏尹岚
2020-11-17 17:22:29 +08:00
parent 5a0842eba7
commit 833bc63cad

View File

@@ -59,7 +59,7 @@ func (p *PayHandler) CreatePay() (err error) {
TimeStart: wxpayapi.Time2PayTime(time.Now()),
// ProfitSharing: wxpayapi.OptYes,
}
if authInfo, err := p.Ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeWxApp {
if authInfo, err := p.Ctx.GetV2AuthInfo(); err == nil {
param.OpenID = authInfo.GetAuthID()
}
result, err := api.WxpayAPI.CreateUnifiedOrder(param)