diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.cs
index 50ace17e..11c84e0c 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.cs
@@ -72,7 +72,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
///
[Newtonsoft.Json.JsonProperty("business_category")]
[System.Text.Json.Serialization.JsonPropertyName("business_category")]
- public string BusinessCategoryCode { get; set; } = string.Empty;
+ public int BusinessCategoryCode { get; set; }
///
/// 获取或设置商户类别编码。
@@ -117,42 +117,42 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
public string BusinessType { get; set; } = string.Empty;
///
- /// 获取或设置 App 下载链接。
+ /// 获取或设置 App 下载链接。
///
[Newtonsoft.Json.JsonProperty("app_download")]
[System.Text.Json.Serialization.JsonPropertyName("app_download")]
public string? AppDownloadUrl { get; set; }
///
- /// 获取或设置业务网站地址。
+ /// 获取或设置业务网站地址。
///
[Newtonsoft.Json.JsonProperty("business_website")]
[System.Text.Json.Serialization.JsonPropertyName("business_website")]
- public string? BusinessWebsiteUrl { get; set; }
+ public string? WebsiteUrl { get; set; }
///
- /// 获取或设置公众号 AppId。
+ /// 获取或设置公众号 AppId。
///
[Newtonsoft.Json.JsonProperty("office_account")]
[System.Text.Json.Serialization.JsonPropertyName("office_account")]
public string? OfficeAccountAppId { get; set; }
///
- /// 获取或设置小程序 AppId。
+ /// 获取或设置小程序 AppId。
///
[Newtonsoft.Json.JsonProperty("mini_program")]
[System.Text.Json.Serialization.JsonPropertyName("mini_program")]
public string? MiniProgramAppId { get; set; }
///
- /// 获取或设置门店地址。
+ /// 获取或设置门店地址。
///
[Newtonsoft.Json.JsonProperty("store_address")]
[System.Text.Json.Serialization.JsonPropertyName("store_address")]
public string? StoreAddress { get; set; }
///
- /// 获取或设置门店照片 MediaId 列表。
+ /// 获取或设置门店照片 MediaId 列表。
///
[Newtonsoft.Json.JsonProperty("store_photos")]
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertyStorePhotoMediaIdListNewtonsoftJsonConverter))]
@@ -161,63 +161,63 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
public IList? StorePhotoMediaIdList { get; set; }
///
- /// 获取或设置董事姓名。
+ /// 获取或设置董事姓名。
///
[Newtonsoft.Json.JsonProperty("director_name")]
[System.Text.Json.Serialization.JsonPropertyName("director_name")]
public string? DirectorName { get; set; }
///
- /// 获取或设置董事证件号码。
+ /// 获取或设置董事证件号码。
///
[Newtonsoft.Json.JsonProperty("director_id_number")]
[System.Text.Json.Serialization.JsonPropertyName("director_id_number")]
public string? DirectorIdNumber { get; set; }
///
- /// 获取或设置负责人姓名。
+ /// 获取或设置负责人姓名。
///
[Newtonsoft.Json.JsonProperty("principal_name")]
[System.Text.Json.Serialization.JsonPropertyName("principal_name")]
public string? PrincipalName { get; set; }
///
- /// 获取或设置负责人证件号。
+ /// 获取或设置负责人证件号。
///
[Newtonsoft.Json.JsonProperty("principal_id_number")]
[System.Text.Json.Serialization.JsonPropertyName("principal_id_number")]
public string? PrincipalIdNumber { get; set; }
///
- /// 获取或设置公司电话。
+ /// 获取或设置公司电话。
///
[Newtonsoft.Json.JsonProperty("office_phone")]
[System.Text.Json.Serialization.JsonPropertyName("office_phone")]
public string? OfficePhoneNumber { get; set; }
///
- /// 获取或设置联系人姓名。
+ /// 获取或设置联系人姓名。
///
[Newtonsoft.Json.JsonProperty("contact_name")]
[System.Text.Json.Serialization.JsonPropertyName("contact_name")]
public string? ContactName { get; set; }
///
- /// 获取或设置联系人电话号码。
+ /// 获取或设置联系人电话号码。
///
[Newtonsoft.Json.JsonProperty("contact_phone")]
[System.Text.Json.Serialization.JsonPropertyName("contact_phone")]
public string? ContactPhotoNumber { get; set; }
///
- /// 获取或设置联系人邮箱。
+ /// 获取或设置联系人邮箱。
///
[Newtonsoft.Json.JsonProperty("contact_email")]
[System.Text.Json.Serialization.JsonPropertyName("contact_email")]
public string? ContactEmail { get; set; }
///
- /// 获取或设置子商户结算银行账户 。
+ /// 获取或设置子商户结算银行账户 。
///
[Newtonsoft.Json.JsonProperty("settlement_bank_number")]
[System.Text.Json.Serialization.JsonPropertyName("settlement_bank_number")]
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/GetSubMerchantInstitutionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/GetSubMerchantInstitutionResponse.cs
index f8b0ead4..a7a50c64 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/GetSubMerchantInstitutionResponse.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/GetSubMerchantInstitutionResponse.cs
@@ -59,7 +59,8 @@
///
[Newtonsoft.Json.JsonProperty("business_category")]
[System.Text.Json.Serialization.JsonPropertyName("business_category")]
- public string BusinessCategoryCode { get; set; } = default!;
+ [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
+ public int BusinessCategoryCode { get; set; }
///
/// 获取或设置商户类别编码。
@@ -97,98 +98,98 @@
public string BusinessType { get; set; } = default!;
///
- /// 获取或设置 App 下载链接。
+ /// 获取或设置 App 下载链接。
///
[Newtonsoft.Json.JsonProperty("app_download")]
[System.Text.Json.Serialization.JsonPropertyName("app_download")]
public string? AppDownloadUrl { get; set; }
///
- /// 获取或设置业务网站地址。
+ /// 获取或设置业务网站地址。
///
[Newtonsoft.Json.JsonProperty("business_website")]
[System.Text.Json.Serialization.JsonPropertyName("business_website")]
- public string? BusinessWebsiteUrl { get; set; }
+ public string? WebsiteUrl { get; set; }
///
- /// 获取或设置公众号 AppId。
+ /// 获取或设置公众号 AppId。
///
[Newtonsoft.Json.JsonProperty("office_account")]
[System.Text.Json.Serialization.JsonPropertyName("office_account")]
public string? OfficeAccountAppId { get; set; }
///
- /// 获取或设置小程序 AppId。
+ /// 获取或设置小程序 AppId。
///
[Newtonsoft.Json.JsonProperty("mini_program")]
[System.Text.Json.Serialization.JsonPropertyName("mini_program")]
public string? MiniProgramAppId { get; set; }
///
- /// 获取或设置门店地址。
+ /// 获取或设置门店地址。
///
[Newtonsoft.Json.JsonProperty("store_address")]
[System.Text.Json.Serialization.JsonPropertyName("store_address")]
public string? StoreAddress { get; set; }
///
- /// 获取或设置董事姓名。
+ /// 获取或设置董事姓名。
///
[Newtonsoft.Json.JsonProperty("director_name")]
[System.Text.Json.Serialization.JsonPropertyName("director_name")]
public string? DirectorName { get; set; }
///
- /// 获取或设置董事证件号码。
+ /// 获取或设置董事证件号码。
///
[Newtonsoft.Json.JsonProperty("director_id_number")]
[System.Text.Json.Serialization.JsonPropertyName("director_id_number")]
public string? DirectorIdNumber { get; set; }
///
- /// 获取或设置负责人姓名。
+ /// 获取或设置负责人姓名。
///
[Newtonsoft.Json.JsonProperty("principal_name")]
[System.Text.Json.Serialization.JsonPropertyName("principal_name")]
public string? PrincipalName { get; set; }
///
- /// 获取或设置负责人证件号。
+ /// 获取或设置负责人证件号。
///
[Newtonsoft.Json.JsonProperty("principal_id_number")]
[System.Text.Json.Serialization.JsonPropertyName("principal_id_number")]
public string? PrincipalIdNumber { get; set; }
///
- /// 获取或设置公司电话。
+ /// 获取或设置公司电话。
///
[Newtonsoft.Json.JsonProperty("office_phone")]
[System.Text.Json.Serialization.JsonPropertyName("office_phone")]
public string? OfficePhoneNumber { get; set; }
///
- /// 获取或设置联系人姓名。
+ /// 获取或设置联系人姓名。
///
[Newtonsoft.Json.JsonProperty("contact_name")]
[System.Text.Json.Serialization.JsonPropertyName("contact_name")]
public string? ContactName { get; set; }
///
- /// 获取或设置联系人电话号码。
+ /// 获取或设置联系人电话号码。
///
[Newtonsoft.Json.JsonProperty("contact_phone")]
[System.Text.Json.Serialization.JsonPropertyName("contact_phone")]
public string? ContactPhotoNumber { get; set; }
///
- /// 获取或设置联系人邮箱。
+ /// 获取或设置联系人邮箱。
///
[Newtonsoft.Json.JsonProperty("contact_email")]
[System.Text.Json.Serialization.JsonPropertyName("contact_email")]
public string? ContactEmail { get; set; }
///
- /// 获取或设置子商户结算银行账户 。
+ /// 获取或设置子商户结算银行账户 。
///
[Newtonsoft.Json.JsonProperty("settlement_bank_number")]
[System.Text.Json.Serialization.JsonPropertyName("settlement_bank_number")]
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.cs
index 6fe59241..580a3f60 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.cs
@@ -72,7 +72,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
///
[Newtonsoft.Json.JsonProperty("business_category")]
[System.Text.Json.Serialization.JsonPropertyName("business_category")]
- public string BusinessCategoryCode { get; set; } = string.Empty;
+ public int BusinessCategoryCode { get; set; }
///
/// 获取或设置商户类别编码。
@@ -117,42 +117,42 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
public string BusinessType { get; set; } = string.Empty;
///
- /// 获取或设置 App 下载链接。
+ /// 获取或设置 App 下载链接。
///
[Newtonsoft.Json.JsonProperty("app_download")]
[System.Text.Json.Serialization.JsonPropertyName("app_download")]
public string? AppDownloadUrl { get; set; }
///
- /// 获取或设置业务网站地址。
+ /// 获取或设置业务网站地址。
///
[Newtonsoft.Json.JsonProperty("business_website")]
[System.Text.Json.Serialization.JsonPropertyName("business_website")]
- public string? BusinessWebsiteUrl { get; set; }
+ public string? WebsiteUrl { get; set; }
///
- /// 获取或设置公众号 AppId。
+ /// 获取或设置公众号 AppId。
///
[Newtonsoft.Json.JsonProperty("office_account")]
[System.Text.Json.Serialization.JsonPropertyName("office_account")]
public string? OfficeAccountAppId { get; set; }
///
- /// 获取或设置小程序 AppId。
+ /// 获取或设置小程序 AppId。
///
[Newtonsoft.Json.JsonProperty("mini_program")]
[System.Text.Json.Serialization.JsonPropertyName("mini_program")]
public string? MiniProgramAppId { get; set; }
///
- /// 获取或设置门店地址。
+ /// 获取或设置门店地址。
///
[Newtonsoft.Json.JsonProperty("store_address")]
[System.Text.Json.Serialization.JsonPropertyName("store_address")]
public string? StoreAddress { get; set; }
///
- /// 获取或设置门店照片 MediaId 列表。
+ /// 获取或设置门店照片 MediaId 列表。
///
[Newtonsoft.Json.JsonProperty("store_photos")]
[Newtonsoft.Json.JsonConverter(typeof(Converters.RequestPropertyStorePhotoMediaIdListNewtonsoftJsonConverter))]
@@ -161,63 +161,63 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
public IList? StorePhotoMediaIdList { get; set; }
///
- /// 获取或设置董事姓名。
+ /// 获取或设置董事姓名。
///
[Newtonsoft.Json.JsonProperty("director_name")]
[System.Text.Json.Serialization.JsonPropertyName("director_name")]
public string? DirectorName { get; set; }
///
- /// 获取或设置董事证件号码。
+ /// 获取或设置董事证件号码。
///
[Newtonsoft.Json.JsonProperty("director_id_number")]
[System.Text.Json.Serialization.JsonPropertyName("director_id_number")]
public string? DirectorIdNumber { get; set; }
///
- /// 获取或设置负责人姓名。
+ /// 获取或设置负责人姓名。
///
[Newtonsoft.Json.JsonProperty("principal_name")]
[System.Text.Json.Serialization.JsonPropertyName("principal_name")]
public string? PrincipalName { get; set; }
///
- /// 获取或设置负责人证件号。
+ /// 获取或设置负责人证件号。
///
[Newtonsoft.Json.JsonProperty("principal_id_number")]
[System.Text.Json.Serialization.JsonPropertyName("principal_id_number")]
public string? PrincipalIdNumber { get; set; }
///
- /// 获取或设置公司电话。
+ /// 获取或设置公司电话。
///
[Newtonsoft.Json.JsonProperty("office_phone")]
[System.Text.Json.Serialization.JsonPropertyName("office_phone")]
public string? OfficePhoneNumber { get; set; }
///
- /// 获取或设置联系人姓名。
+ /// 获取或设置联系人姓名。
///
[Newtonsoft.Json.JsonProperty("contact_name")]
[System.Text.Json.Serialization.JsonPropertyName("contact_name")]
public string? ContactName { get; set; }
///
- /// 获取或设置联系人电话号码。
+ /// 获取或设置联系人电话号码。
///
[Newtonsoft.Json.JsonProperty("contact_phone")]
[System.Text.Json.Serialization.JsonPropertyName("contact_phone")]
public string? ContactPhotoNumber { get; set; }
///
- /// 获取或设置联系人邮箱。
+ /// 获取或设置联系人邮箱。
///
[Newtonsoft.Json.JsonProperty("contact_email")]
[System.Text.Json.Serialization.JsonPropertyName("contact_email")]
public string? ContactEmail { get; set; }
///
- /// 获取或设置子商户结算银行账户 。
+ /// 获取或设置子商户结算银行账户 。
///
[Newtonsoft.Json.JsonProperty("settlement_bank_number")]
[System.Text.Json.Serialization.JsonPropertyName("settlement_bank_number")]
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantMediaExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantMediaExtensions.cs
index 7aa01a68..02d4ab12 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantMediaExtensions.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantMediaExtensions.cs
@@ -18,6 +18,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
/// 异步调用 [POST] /merchant/media/upload 接口。
/// REF: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter2_1_1.shtml
/// REF: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter2_1_1.shtml
+ /// REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/tool/chapter3_2.shtml
///
///
///
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantsExtensions.cs
new file mode 100644
index 00000000..efaee54f
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantsExtensions.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Flurl.Http;
+
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
+{
+ ///
+ /// 为 提供境外支付子商户进件相关的 API 扩展方法。
+ ///
+ public static class WechatTenpayClientExecuteMerchantsExtensions
+ {
+ ///
+ /// 异步调用 [POST] /merchants 接口。
+ /// REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/Onborading_Sub_Merchant/chapter3_1.shtml
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteAddSubMerchantAsync(this WechatTenpayClient client, Models.AddSubMerchantRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.MerchantId == null)
+ request.MerchantId = client.Credentials.MerchantId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Post, "merchants")
+ .WithHeader("Idempotency-Key", request.IdempotencyKey);
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [GET] /merchants/{sub_mchid} 接口。
+ /// REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/Onborading%20Sub%20Merchant/chapter3_2.shtml
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteGetSubMerchantAsync(this WechatTenpayClient client, Models.GetSubMerchantRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.MerchantId == null)
+ request.MerchantId = client.Credentials.MerchantId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "merchants", request.SubMerchantId)
+ .SetQueryParam("sp_mchid", request.MerchantId)
+ .SetQueryParam("sp_appid", request.AppId);
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [PUT] /merchants 接口。
+ /// REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/Onborading_Sub_Merchant/chapter3_3.shtml
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteModifySubMerchantAsync(this WechatTenpayClient client, Models.ModifySubMerchantRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.MerchantId == null)
+ request.MerchantId = client.Credentials.MerchantId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Put, "merchants");
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/AddSubMerchantRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/AddSubMerchantRequest.cs
new file mode 100644
index 00000000..d15f5820
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/AddSubMerchantRequest.cs
@@ -0,0 +1,260 @@
+using System.Collections.Generic;
+
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
+{
+ ///
+ /// 表示 [POST] /merchants 接口的请求。
+ ///
+ [WechatTenpaySensitive]
+ public class AddSubMerchantRequest : WechatTenpayRequest
+ {
+ public static class Types
+ {
+ public class Contact
+ {
+ ///
+ /// 获取或设置联系人姓名(需使用平台公钥/证书加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ [WechatTenpaySensitiveProperty(algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS1)]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置联系电话号码(需使用平台公钥/证书加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("phone")]
+ [System.Text.Json.Serialization.JsonPropertyName("phone")]
+ [WechatTenpaySensitiveProperty(algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS1)]
+ public string PhoneNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置联系邮箱(需使用平台公钥/证书加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("email")]
+ [System.Text.Json.Serialization.JsonPropertyName("email")]
+ [WechatTenpaySensitiveProperty(algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS1)]
+ public string Email { get; set; } = string.Empty;
+ }
+
+ public class Business
+ {
+ ///
+ /// 获取或设置业务类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("business_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("business_type")]
+ public string BusinessType { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置商户类别编码。
+ ///
+ [Newtonsoft.Json.JsonProperty("mcc")]
+ [System.Text.Json.Serialization.JsonPropertyName("mcc")]
+ public string? MerchantCategoryCode { get; set; }
+
+ ///
+ /// 获取或设置 App 下载链接。
+ ///
+ [Newtonsoft.Json.JsonProperty("app_download")]
+ [System.Text.Json.Serialization.JsonPropertyName("app_download")]
+ public string? AppDownloadUrl { get; set; }
+
+ ///
+ /// 获取或设置业务网站链接。
+ ///
+ [Newtonsoft.Json.JsonProperty("website")]
+ [System.Text.Json.Serialization.JsonPropertyName("website")]
+ public string? WebsiteUrl { get; set; }
+
+ ///
+ /// 获取或设置公众号 AppId。
+ ///
+ [Newtonsoft.Json.JsonProperty("office_account")]
+ [System.Text.Json.Serialization.JsonPropertyName("office_account")]
+ public string? OfficeAccountAppId { get; set; }
+
+ ///
+ /// 获取或设置小程序 AppId。
+ ///
+ [Newtonsoft.Json.JsonProperty("mini_program")]
+ [System.Text.Json.Serialization.JsonPropertyName("mini_program")]
+ public string? MiniProgramAppId { get; set; }
+
+ ///
+ /// 获取或设置门店地址。
+ ///
+ [Newtonsoft.Json.JsonProperty("store_address")]
+ [System.Text.Json.Serialization.JsonPropertyName("store_address")]
+ public string? StoreAddress { get; set; }
+
+ ///
+ /// 获取或设置门店照片 MediaId 列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("store_photos")]
+ [System.Text.Json.Serialization.JsonPropertyName("store_photos")]
+ public IList? StorePhotoMediaIdList { get; set; }
+ }
+
+ public class Director
+ {
+ ///
+ /// 获取或设置董事姓名。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置董事证件号。
+ ///
+ [Newtonsoft.Json.JsonProperty("number")]
+ [System.Text.Json.Serialization.JsonPropertyName("number")]
+ public string? IdNumber { get; set; }
+ }
+
+ public class Principal
+ {
+ ///
+ /// 获取或设置负责人姓名。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置负责人证件号。
+ ///
+ [Newtonsoft.Json.JsonProperty("number")]
+ [System.Text.Json.Serialization.JsonPropertyName("number")]
+ public string? IdNumber { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置业务请求幂等值。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string IdempotencyKey { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置机构商户号。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonProperty("sp_mchid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
+ public string? MerchantId { get; set; }
+
+ ///
+ /// 获取或设置机构微信 AppId。
+ ///
+ [Newtonsoft.Json.JsonProperty("sp_appid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sp_appid")]
+ public string AppId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置渠道号。
+ ///
+ [Newtonsoft.Json.JsonProperty("channel_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("channel_id")]
+ public string? ChannelId { get; set; }
+
+ ///
+ /// 获取或设置商户类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_type")]
+ public string MerchantType { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置子商户全称。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string MerchantName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置子商户简称。
+ ///
+ [Newtonsoft.Json.JsonProperty("shortname")]
+ [System.Text.Json.Serialization.JsonPropertyName("shortname")]
+ public string MerchantShortName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置注册国家或地区代码。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_country_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_country_code")]
+ public string CountryCode { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置公司电话号码。
+ ///
+ [Newtonsoft.Json.JsonProperty("office_phone")]
+ [System.Text.Json.Serialization.JsonPropertyName("office_phone")]
+ public string OfficePhoneNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置联系人信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("contact")]
+ [System.Text.Json.Serialization.JsonPropertyName("contact")]
+ public Types.Contact Contact { get; set; } = new Types.Contact();
+
+ ///
+ /// 获取或设置商业类目编码。
+ ///
+ [Newtonsoft.Json.JsonProperty("business_category")]
+ [System.Text.Json.Serialization.JsonPropertyName("business_category")]
+ public int BusinessCategoryCode { get; set; }
+
+ ///
+ /// 获取或设置公司注册文件编号。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_number")]
+ public string RegistrationCertificateNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置公司注册文件过期时间字符串(格式:yyyy-MM-dd / PERMANENT)。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_date")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_date")]
+ public string RegistrationCertificateDateString { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置公司注册文件照片 MediaId。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_copy")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_copy")]
+ public string? RegistrationCertificateCopyMediaId { get; set; }
+
+ ///
+ /// 获取或设置子商户银行结算账户信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("settlement_bank_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("settlement_bank_number")]
+ public string SettlementBankNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置业务信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("business")]
+ [System.Text.Json.Serialization.JsonPropertyName("business")]
+ public Types.Business Business { get; set; } = new Types.Business();
+
+ ///
+ /// 获取或设置董事信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("director")]
+ [System.Text.Json.Serialization.JsonPropertyName("director")]
+ public Types.Director? Director { get; set; }
+
+ ///
+ /// 获取或设置负责人信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("principal")]
+ [System.Text.Json.Serialization.JsonPropertyName("principal")]
+ public Types.Principal? Principal { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/AddSubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/AddSubMerchantResponse.cs
new file mode 100644
index 00000000..88f8ac6b
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/AddSubMerchantResponse.cs
@@ -0,0 +1,29 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
+{
+ ///
+ /// 表示 [POST] /merchants 接口的响应。
+ ///
+ public class AddSubMerchantResponse : WechatTenpayResponse
+ {
+ ///
+ /// 获取或设置子商户号。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_mchid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
+ public string SubMerchantId { get; set; } = default!;
+
+ ///
+ /// 获取或设置验证状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("verification_status")]
+ [System.Text.Json.Serialization.JsonPropertyName("verification_status")]
+ public string? VerificationStatus { get; set; }
+
+ ///
+ /// 获取或设置验证状态描述。
+ ///
+ [Newtonsoft.Json.JsonProperty("description")]
+ [System.Text.Json.Serialization.JsonPropertyName("description")]
+ public string? VerificationStatusDescription { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/GetSubMerchantRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/GetSubMerchantRequest.cs
new file mode 100644
index 00000000..efed4754
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/GetSubMerchantRequest.cs
@@ -0,0 +1,30 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
+{
+ ///
+ /// 表示 [GET] /merchants/{sub_mchid} 接口的请求。
+ ///
+ [WechatTenpaySensitive]
+ public class GetSubMerchantRequest : WechatTenpayRequest
+ {
+ ///
+ /// 获取或设置机构商户号。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string? MerchantId { get; set; }
+
+ ///
+ /// 获取或设置机构微信 AppId。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string AppId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置子商户号。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string SubMerchantId { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/GetSubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/GetSubMerchantResponse.cs
new file mode 100644
index 00000000..b28a4eb9
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/GetSubMerchantResponse.cs
@@ -0,0 +1,223 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
+{
+ ///
+ /// 表示 [GET] /merchants/{sub_mchid} 接口的响应。
+ ///
+ public class GetSubMerchantResponse : WechatTenpayResponse
+ {
+ public static class Types
+ {
+ public class Contact
+ {
+ ///
+ /// 获取或设置联系人姓名(需使用商户私钥解密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ [WechatTenpaySensitiveProperty(algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS1)]
+ public string Name { get; set; } = default!;
+
+ ///
+ /// 获取或设置联系电话号码(需使用商户私钥解密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("phone")]
+ [System.Text.Json.Serialization.JsonPropertyName("phone")]
+ [WechatTenpaySensitiveProperty(algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS1)]
+ public string PhoneNumber { get; set; } = default!;
+
+ ///
+ /// 获取或设置联系邮箱(需使用商户私钥解密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("email")]
+ [System.Text.Json.Serialization.JsonPropertyName("email")]
+ [WechatTenpaySensitiveProperty(algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS1)]
+ public string Email { get; set; } = default!;
+ }
+
+ public class Business
+ {
+ ///
+ /// 获取或设置业务类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("business_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("business_type")]
+ public string BusinessType { get; set; } = default!;
+
+ ///
+ /// 获取或设置商户类别编码。
+ ///
+ [Newtonsoft.Json.JsonProperty("mcc")]
+ [System.Text.Json.Serialization.JsonPropertyName("mcc")]
+ public string? MerchantCategoryCode { get; set; }
+
+ ///
+ /// 获取或设置 App 下载链接。
+ ///
+ [Newtonsoft.Json.JsonProperty("app_download")]
+ [System.Text.Json.Serialization.JsonPropertyName("app_download")]
+ public string? AppDownloadUrl { get; set; }
+
+ ///
+ /// 获取或设置业务网站链接。
+ ///
+ [Newtonsoft.Json.JsonProperty("website")]
+ [System.Text.Json.Serialization.JsonPropertyName("website")]
+ public string? WebsiteUrl { get; set; }
+
+ ///
+ /// 获取或设置公众号 AppId。
+ ///
+ [Newtonsoft.Json.JsonProperty("office_account")]
+ [System.Text.Json.Serialization.JsonPropertyName("office_account")]
+ public string? OfficeAccountAppId { get; set; }
+
+ ///
+ /// 获取或设置小程序 AppId。
+ ///
+ [Newtonsoft.Json.JsonProperty("mini_program")]
+ [System.Text.Json.Serialization.JsonPropertyName("mini_program")]
+ public string? MiniProgramAppId { get; set; }
+
+ ///
+ /// 获取或设置门店地址。
+ ///
+ [Newtonsoft.Json.JsonProperty("store_address")]
+ [System.Text.Json.Serialization.JsonPropertyName("store_address")]
+ public string? StoreAddress { get; set; }
+ }
+
+ public class Director
+ {
+ ///
+ /// 获取或设置董事姓名。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string Name { get; set; } = default!;
+
+ ///
+ /// 获取或设置董事证件号。
+ ///
+ [Newtonsoft.Json.JsonProperty("number")]
+ [System.Text.Json.Serialization.JsonPropertyName("number")]
+ public string? IdNumber { get; set; }
+ }
+
+ public class Principal
+ {
+ ///
+ /// 获取或设置负责人姓名。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string Name { get; set; } = default!;
+
+ ///
+ /// 获取或设置负责人证件号。
+ ///
+ [Newtonsoft.Json.JsonProperty("number")]
+ [System.Text.Json.Serialization.JsonPropertyName("number")]
+ public string? IdNumber { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置子商户号。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_mchid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
+ public string SubMerchantId { get; set; } = default!;
+
+ ///
+ /// 获取或设置商户类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_type")]
+ public string MerchantType { get; set; } = default!;
+
+ ///
+ /// 获取或设置子商户全称。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string MerchantName { get; set; } = default!;
+
+ ///
+ /// 获取或设置子商户简称。
+ ///
+ [Newtonsoft.Json.JsonProperty("shortname")]
+ [System.Text.Json.Serialization.JsonPropertyName("shortname")]
+ public string MerchantShortName { get; set; } = default!;
+
+ ///
+ /// 获取或设置注册国家或地区代码。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_country_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_country_code")]
+ public string CountryCode { get; set; } = default!;
+
+ ///
+ /// 获取或设置公司电话号码。
+ ///
+ [Newtonsoft.Json.JsonProperty("office_phone")]
+ [System.Text.Json.Serialization.JsonPropertyName("office_phone")]
+ public string OfficePhoneNumber { get; set; } = default!;
+
+ ///
+ /// 获取或设置联系人信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("contact")]
+ [System.Text.Json.Serialization.JsonPropertyName("contact")]
+ public Types.Contact Contact { get; set; } = default!;
+
+ ///
+ /// 获取或设置商业类目编码。
+ ///
+ [Newtonsoft.Json.JsonProperty("business_category")]
+ [System.Text.Json.Serialization.JsonPropertyName("business_category")]
+ [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
+ public int BusinessCategoryCode { get; set; }
+
+ ///
+ /// 获取或设置公司注册文件编号。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_number")]
+ public string RegistrationCertificateNumber { get; set; } = default!;
+
+ ///
+ /// 获取或设置公司注册文件过期时间字符串(格式:yyyy-MM-dd / PERMANENT)。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_date")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_date")]
+ public string RegistrationCertificateDateString { get; set; } = default!;
+
+ ///
+ /// 获取或设置子商户银行结算账户信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("settlement_bank_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("settlement_bank_number")]
+ public string SettlementBankNumber { get; set; } = default!;
+
+ ///
+ /// 获取或设置业务信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("business")]
+ [System.Text.Json.Serialization.JsonPropertyName("business")]
+ public Types.Business Business { get; set; } = default!;
+
+ ///
+ /// 获取或设置董事信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("director")]
+ [System.Text.Json.Serialization.JsonPropertyName("director")]
+ public Types.Director? Director { get; set; }
+
+ ///
+ /// 获取或设置负责人信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("principal")]
+ [System.Text.Json.Serialization.JsonPropertyName("principal")]
+ public Types.Principal? Principal { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/ModifySubMerchantRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/ModifySubMerchantRequest.cs
new file mode 100644
index 00000000..11020fd0
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/ModifySubMerchantRequest.cs
@@ -0,0 +1,154 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
+{
+ ///
+ /// 表示 [PUT] /merchants 接口的请求。
+ ///
+ [WechatTenpaySensitive]
+ public class ModifySubMerchantRequest : WechatTenpayRequest
+ {
+ public static class Types
+ {
+ public class Contact : AddSubMerchantRequest.Types.Contact
+ {
+ }
+
+ public class Business : AddSubMerchantRequest.Types.Business
+ {
+ }
+
+ public class Director : AddSubMerchantRequest.Types.Director
+ {
+ }
+
+ public class Principal : AddSubMerchantRequest.Types.Principal
+ {
+ }
+ }
+
+ ///
+ /// 获取或设置机构商户号。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonProperty("sp_mchid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
+ public string? MerchantId { get; set; }
+
+ ///
+ /// 获取或设置机构微信 AppId。
+ ///
+ [Newtonsoft.Json.JsonProperty("sp_appid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sp_appid")]
+ public string AppId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置子商户号。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_mchid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
+ public string SubMerchantId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置渠道号。
+ ///
+ [Newtonsoft.Json.JsonProperty("channel_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("channel_id")]
+ public string? ChannelId { get; set; }
+
+ ///
+ /// 获取或设置商户类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_type")]
+ public string MerchantType { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置子商户全称。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ public string MerchantName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置子商户简称。
+ ///
+ [Newtonsoft.Json.JsonProperty("shortname")]
+ [System.Text.Json.Serialization.JsonPropertyName("shortname")]
+ public string MerchantShortName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置注册国家或地区代码。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_country_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_country_code")]
+ public string CountryCode { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置公司电话号码。
+ ///
+ [Newtonsoft.Json.JsonProperty("office_phone")]
+ [System.Text.Json.Serialization.JsonPropertyName("office_phone")]
+ public string OfficePhoneNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置联系人信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("contact")]
+ [System.Text.Json.Serialization.JsonPropertyName("contact")]
+ public Types.Contact Contact { get; set; } = new Types.Contact();
+
+ ///
+ /// 获取或设置商业类目编码。
+ ///
+ [Newtonsoft.Json.JsonProperty("business_category")]
+ [System.Text.Json.Serialization.JsonPropertyName("business_category")]
+ public int BusinessCategoryCode { get; set; }
+
+ ///
+ /// 获取或设置公司注册文件编号。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_number")]
+ public string RegistrationCertificateNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置公司注册文件过期时间字符串(格式:yyyy-MM-dd / PERMANENT)。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_date")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_date")]
+ public string RegistrationCertificateDateString { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置公司注册文件照片 MediaId。
+ ///
+ [Newtonsoft.Json.JsonProperty("registration_certificate_copy")]
+ [System.Text.Json.Serialization.JsonPropertyName("registration_certificate_copy")]
+ public string? RegistrationCertificateCopyMediaId { get; set; }
+
+ ///
+ /// 获取或设置子商户银行结算账户信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("settlement_bank_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("settlement_bank_number")]
+ public string SettlementBankNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置业务信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("business")]
+ [System.Text.Json.Serialization.JsonPropertyName("business")]
+ public Types.Business Business { get; set; } = new Types.Business();
+
+ ///
+ /// 获取或设置董事信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("director")]
+ [System.Text.Json.Serialization.JsonPropertyName("director")]
+ public Types.Director? Director { get; set; }
+
+ ///
+ /// 获取或设置负责人信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("principal")]
+ [System.Text.Json.Serialization.JsonPropertyName("principal")]
+ public Types.Principal? Principal { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/ModifySubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/ModifySubMerchantResponse.cs
new file mode 100644
index 00000000..cea12288
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/Models/Merchants/ModifySubMerchantResponse.cs
@@ -0,0 +1,15 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
+{
+ ///
+ /// 表示 [PUT] /merchants 接口的响应。
+ ///
+ public class ModifySubMerchantResponse : WechatTenpayResponse
+ {
+ ///
+ /// 获取或设置子商户号。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_mchid")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
+ public string SubMerchantId { get; set; } = default!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/WechatTenpayEndpoints.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/WechatTenpayEndpoints.cs
index dd11a188..4491be70 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/WechatTenpayEndpoints.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayV3/WechatTenpayEndpoints.cs
@@ -15,6 +15,16 @@
///
public const string BACKUP = "https://api2.mch.weixin.qq.com/v3";
+ ///
+ /// 香港域名。
+ ///
+ public const string REGION_HONGKONG = "https://api.mch.weixin.qq.com/hk/v3";
+
+ ///
+ /// 全球域名。
+ ///
+ public const string REGION_GLOBAL = "https://api.mch.weixin.qq.com/global/v3";
+
///
/// 沙箱域名。
///
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.json
index e36118b4..e7aabb34 100644
--- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.json
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/AddSubMerchantInstitutionRequest.json
@@ -7,7 +7,7 @@
"merchant_remark": "202012041",
"merchant_country_code": "036",
"merchant_type": "ENTERPRISE",
- "business_category": "485",
+ "business_category": 485,
"mcc": "4374",
"registration_certificate_number": "5555-8888",
"registration_certificate_date": "2020-05-27",
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.json
index 303aed52..187a5025 100644
--- a/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.json
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests/ModelSamples/MerchantInstitutionSub/ModifySubMerchantInstitutionRequest.json
@@ -7,7 +7,7 @@
"merchant_shortname": "ABC",
"merchant_country_code": "036",
"merchant_type": "ENTERPRISE",
- "business_category": "485",
+ "business_category": 485,
"mcc": "4374",
"registration_certificate_number": "5555-8888",
"registration_certificate_date": "2020-05-27",
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/AddSubMerchantRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/AddSubMerchantRequest.json
new file mode 100644
index 00000000..85316aeb
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/AddSubMerchantRequest.json
@@ -0,0 +1,27 @@
+{
+ "sp_appid": "wx82ec4jy334ner1",
+ "sp_mchid": "2422128905",
+ "name": "testname",
+ "shortname": "shortname",
+ "office_phone": "13680534111",
+ "contact": {
+ "email": "gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==",
+ "name": "Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==",
+ "phone": "l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=="
+ },
+ "business_category": 343,
+ "merchant_country_code": "344",
+ "merchant_type": "ENTERPRISE",
+ "registration_certificate_number": "519723407213085723",
+ "registration_certificate_date": "2022-06-03",
+ "settlement_bank_number": "559304578245298347923856",
+ "business": {
+ "business_type": "ONLINE",
+ "mcc": "5344",
+ "mini_program": "flowerplus"
+ },
+ "director": {
+ "name": "Tom",
+ "number": "1234567890"
+ }
+}
\ No newline at end of file
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/AddSubMerchantResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/AddSubMerchantResponse.json
new file mode 100644
index 00000000..c4cd59fa
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/AddSubMerchantResponse.json
@@ -0,0 +1,3 @@
+{
+ "sub_mchid": "20000100"
+}
\ No newline at end of file
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/GetSubMerchantResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/GetSubMerchantResponse.json
new file mode 100644
index 00000000..b520eace
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/GetSubMerchantResponse.json
@@ -0,0 +1,16 @@
+{
+ "sub_mchid": "20000100",
+ "name": "test mcherchan_name",
+ "shortname": "mcherchan_name",
+ "office_phone": "075586010000",
+ "business_category": "644",
+ "contact": {
+ "name": "Bob Zhang",
+ "phone": "+8613633334444",
+ "email": "test@test.com"
+ },
+ "principal": {
+ "name": "Bob",
+ "number": "5555-8888"
+ }
+}
\ No newline at end of file
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/ModifySubMerchantRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/ModifySubMerchantRequest.json
new file mode 100644
index 00000000..d0371cd9
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/ModifySubMerchantRequest.json
@@ -0,0 +1,28 @@
+{
+ "sub_mchid": "20000100",
+ "sp_appid": "wx82ec4jy334ner1",
+ "sp_mchid": "2422128905",
+ "name": "testname",
+ "shortname": "shortname",
+ "office_phone": "13680534111",
+ "contact": {
+ "email": "gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==",
+ "name": "Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==",
+ "phone": "l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=="
+ },
+ "business_category": 343,
+ "merchant_country_code": "344",
+ "merchant_type": "ENTERPRISE",
+ "registration_certificate_number": "519723407213085723",
+ "registration_certificate_date": "2022-06-03",
+ "settlement_bank_number": "559304578245298347923856",
+ "business": {
+ "business_type": "ONLINE",
+ "mcc": "5344",
+ "mini_program": "flowerplus"
+ },
+ "director": {
+ "name": "Tom",
+ "number": "1234567890"
+ }
+}
\ No newline at end of file
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/ModifySubMerchantResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/ModifySubMerchantResponse.json
new file mode 100644
index 00000000..c4cd59fa
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/ModelSamples/Merchants/ModifySubMerchantResponse.json
@@ -0,0 +1,3 @@
+{
+ "sub_mchid": "20000100"
+}
\ No newline at end of file