fix domain

This commit is contained in:
2025-06-19 21:30:57 +08:00
parent 49843017c0
commit c062908aae
10 changed files with 97 additions and 93 deletions

View File

@@ -119,7 +119,7 @@ func newWechatPayServiceWithWxPayPubKey(c config.Config, userAuthModel model.Use
panic(fmt.Sprintf("初始化失败,服务停止: %v", err))
}
// 从文件中加载微信支付平台证书
// 从文件中加载支付公钥
mchPublicKey, err := utils.LoadPublicKeyWithPath(mchPublicKeyPath)
if err != nil {
logx.Errorf("加载微信支付平台证书失败: %v", err)
@@ -135,8 +135,11 @@ func newWechatPayServiceWithWxPayPubKey(c config.Config, userAuthModel model.Use
logx.Errorf("创建微信支付客户端失败: %v", err)
panic(fmt.Sprintf("初始化失败,服务停止: %v", err))
}
// 初始化 notify.Handler
err = downloader.MgrInstance().RegisterDownloaderWithPrivateKey(context.Background(), mchPrivateKey, mchCertificateSerialNumber, mchID, mchAPIv3Key)
if err != nil {
logx.Errorf("注册下载器失败: %v", err)
panic(fmt.Sprintf("初始化失败,服务停止: %v", err))
}
certificateVisitor := downloader.MgrInstance().GetCertificateVisitor(mchID)
notifyHandler := notify.NewNotifyHandler(
mchAPIv3Key,