feat(wxapi): 新增微信小店推客带货相关接口

This commit is contained in:
Fu Diwei
2025-06-07 22:47:25 +08:00
parent 29dc515571
commit dfc1d4e470
218 changed files with 5399 additions and 130 deletions

View File

@@ -183,11 +183,12 @@
<summary>[展开查看]</summary>
| | 微信 API | 备注 |
| :-: | :------------: | :--: |
| √ | 微信小店 | |
| √ | 达人带货 | |
| √ | 带货助手 | |
| | 微信 API | 备注 |
| :-: | :------: | :--: |
| √ | 微信小店 | |
| √ | 达人带货 | |
| √ | 推客带货 | |
| √ | 带货助手 | |
</details>

View File

@@ -47,11 +47,11 @@ var client = WechatApiClientBuilder.Create(options).Build();
var options = new WechatApiClientOptions()
{
// 其他配置项略
SecureApiCustomRequestPathMatcher = (url) =>
SecureApiCustomRequestPathMatcher = (path) =>
{
if (url == "/sns/auth")
if (path == "/sns/auth")
return true;
else if (url == "/sns/userinfo")
else if (path == "/sns/userinfo")
return true;
return false;

View File

@@ -19,3 +19,21 @@ var client = WechatTenpayGlobalClientBuilder.Create(options).Build();
```
该扩展客户端在用法上基础客户端完全相同,只需引入相应的命名空间即可。
---
### 切换接入点
默认情况下,微信支付境外支付 API 客户端的接入点为 `https://apihk.mch.weixin.qq.com/v3/global`
如果你要切换为 `https://api.mch.weixin.qq.com/hk/v3` 或其他入口点,可以在构造客户端时指定:
```csharp
var options = new WechatTenpayGlobalClientOptions()
{
// 其他配置项略
Endpoint = "https://api.mch.weixin.qq.com/hk/v3" // 注意结尾不要带 "/"
};
var client = WechatTenpayGlobalClientBuilder.Create(options).Build();
```