royalrick / weapp

微信小程序服务端 SDK (for Golang)
https://pkg.go.dev/github.com/medivhzhan/weapp/v3
Apache License 2.0
1.47k stars 281 forks source link

wrong param with GetParams function #2

Closed leezhm closed 6 years ago

leezhm commented 6 years ago

// 获取小程序前点调用支付接口所需参数 params, err := payment.GetParams(res.AppID, res.MchID, res.NonceStr, res.PrePayID, time.Now()) if err != nil { // handle error return }

the paySign should use apikey not MchID, and here is the wechat app pay document

royalrick commented 6 years ago

You are right, I've fixed it, thanks for that.