Skip to content

Commit cd0730c

Browse files
committed
docs: 完善文档
1 parent f12398a commit cd0730c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/WechatTenpayV3/README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,25 @@
3939
using SKIT.FlurlHttpClient.Wechat.TenpayV3;
4040
using SKIT.FlurlHttpClient.Wechat.TenpayV3.Settings;
4141

42-
var manager = new InMemoryCertificateManager();
4342
var options = new WechatTenpayClientOptions()
4443
{
4544
MerchantId = "微信商户号",
4645
MerchantV3Secret = "微信商户 v3 API 密钥",
4746
MerchantCertificateSerialNumber = "微信商户证书序列号",
4847
MerchantCertificatePrivateKey = System.IO.File.ReadAllText("/微信商户证书私钥文件路径/apiclient_key.pem"),
49-
PlatformCertificateManager = manager
48+
49+
// 基于平台证书的认证方式还需设置以下参数:
50+
PlatformAuthScheme = Settings.PlatformAuthScheme.Certificate,
51+
PlatformCertificateManager = new InMemoryCertificateManager()
52+
53+
// 基于平台公钥的认证方式还需设置以下参数:
54+
PlatformAuthScheme = Settings.PlatformAuthScheme.PublicKey,
55+
PlatformPublicKeyManager = new InMemoryPublicKeyManager()
5056
};
5157
var client = WechatTenpayClientBuilder.Create(options).Build();
5258
```
5359

54-
🔥 平台证书管理器的具体用法请参阅下文的基础用法与加密、验签有关的章节。
55-
56-
🔥 另,2024 年 10 月后新注册的微信商户已不再提供平台证书,取而代之的是平台公钥。与平台证书管理器类似,具体用法也请参阅下文的基础用法与加密、验签有关的章节。
60+
🔥 平台证书管理器、平台公钥管理器的具体用法请参阅下文的基础用法与加密、验签有关的章节。
5761

5862
### 请求 & 响应:
5963

0 commit comments

Comments
 (0)