-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信v3验签的一些疑问 #267
Comments
需要的,异步回调里的验签,是微信通知你支付结果的,为了安全起见,防止假通知,还是需要的 |
@iGoogle-ink 那手动验签的前提是 |
不知道我理解的对不对,自动验签开启好像client.WxPublicKey()就会有值,而不需要手动client.SetPlatformCert([]byte(""), ""),我理解的对吗? |
对的,你可以看看源码内容,开启自动验签,会自动定期获取微信公钥证书并自动赋值,所以就不用手动设置了 |
我在微信支付成功异步回调里这样用对吗? 还是说不能开启自动验签?你自动验签内部写了定时任务吗? |
全局初始化一个client就行了,每次new开销太大,多个goroutine并发使用client 是安全的 |
1.自动验签开启后,支付异步回调里还需要验签吗?
// wxPublicKey 通过 client.WxPublicKey() 获取 err = notifyReq.VerifySignByPK(wxPublicKey) if err != nil { xlog.Error(err) return }
这个手动验签是异步回调里必须的吗?
The text was updated successfully, but these errors were encountered: