优化支付宝和微信支付服务参数:

1. 删减支付宝参数,只需要传入应用私钥和支付宝公钥。
2. 所有的秘钥直接写入配置文档传入,而不是传入秘钥文件路径,简化参数配置
This commit is contained in:
GeekMaster
2025-07-25 19:15:36 +08:00
parent 6cfc7175e8
commit c19b7db8c0
3 changed files with 11 additions and 29 deletions

View File

@@ -53,11 +53,8 @@ type AlipayConfig struct {
Enabled bool // 是否启用该支付通道
SandBox bool // 是否沙盒环境
AppId string // 应用 ID
UserId string // 支付宝用户 ID
PrivateKey string // 用户私钥文件路径
PublicKey string // 用户公钥文件路径
AlipayPublicKey string // 支付宝公钥文件路径
RootCert string // Root 秘钥路径
PrivateKey string // 商户私钥
AlipayPublicKey string // 支付宝公钥
NotifyURL string // 异步通知地址
ReturnURL string // 同步通知地址
}
@@ -67,7 +64,7 @@ type WechatPayConfig struct {
AppId string // 公众号的APPID,如wxd678efh567hg6787
MchId string // 直连商户的商户号,由微信支付生成并下发
SerialNo string // 商户证书的证书序列号
PrivateKey string // 户私钥文件路径
PrivateKey string // 户私钥
ApiV3Key string // API V3 秘钥
NotifyURL string // 异步通知地址
}