This commit is contained in:
2026-01-15 16:35:23 +08:00
parent 0562725c77
commit 6850d499d6
4 changed files with 4 additions and 6 deletions

View File

@@ -197,12 +197,9 @@ func newWechatPayServiceWithWxPayPubKeyPure(c config.Config, userAuthModel model
panic(fmt.Sprintf("初始化失败,服务停止: %v", err))
}
// 纯公钥模式:只使用公钥进行验签,不注册证书下载器,不使用平台证书
// 使用 SHA256WithRSAPubkeyVerifier 直接使用公钥进行验签
notifyHandler := notify.NewNotifyHandler(
mchAPIv3Key,
verifiers.NewSHA256WithRSAPubkeyVerifier(mchPublicKeyID, *mchPublicKey))
logx.Infof("微信支付客户端初始化成功(微信支付公钥方式-纯公钥模式)")
return &WechatPayService{
config: c,