Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed Jun 25, 2021
1 parent 14db207 commit 15536f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ if err != nil {
xlog.Error(err)
return
}
// WxPkContent 是通过client.GetPlatformCerts()接口向微信获取的微信平台公钥证书内容
err = notifyReq.VerifySign(WxPkContent)
if err != nil {
xlog.Error(err)
Expand Down
1 change: 1 addition & 0 deletions wechat/v3/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func V3ParseNotify(req *http.Request) (notifyReq *V3NotifyReq, err error) {
}

// 异步通知验签
// wxPkContent 是通过client.GetPlatformCerts()接口向微信获取的微信平台公钥证书内容
func (v *V3NotifyReq) VerifySign(wxPkContent string) (err error) {
if v.SignInfo != nil {
return V3VerifySign(v.SignInfo.HeaderTimestamp, v.SignInfo.HeaderNonce, v.SignInfo.SignBody, v.SignInfo.HeaderSignature, wxPkContent)
Expand Down

0 comments on commit 15536f4

Please sign in to comment.