diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs index c7b52c10..82d4a01e 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaBusinessExtensions.cs @@ -9,29 +9,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api { public static class WechatApiClientExecuteWxaBusinessExtensions { - /// - /// 异步调用 [POST] /wxa/business/getpayfororder 接口。 - /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/business.getPayForOrder.html - /// - /// - /// - /// - /// - public static async Task ExecuteWxaBusinessGetPayForOrderAsync(this WechatApiClient client, Models.WxaBusinessGetPayForOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "wxa", "business", "getpayfororder") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - /// /// 异步调用 [POST] /wxa/business/checkencryptedmsg 接口。 /// REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/user-info/auth.checkEncryptedData.html @@ -74,6 +51,31 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + #region Midas + /// + /// 异步调用 [POST] /wxa/business/getpayfororder 接口。 + /// REF: https://developers.weixin.qq.com/minigame/dev/api-backend/midas-payment/business.getPayForOrder.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGetPayForOrderAsync(this WechatApiClient client, Models.WxaBusinessGetPayForOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId == null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "business", "getpayfororder") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion + #region GameMatch /// /// 异步调用 [POST] /wxa/business/gamematch/creatematchrule 接口。 @@ -326,5 +328,67 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } #endregion + + #region B2BStore + /// + /// 异步调用 [POST] /wxa/business/getretailinfo 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/B2b_store_assistant.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessGetRetailInfoAsync(this WechatApiClient client, Models.WxaBusinessGetRetailInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "business", "getretailinfo") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/batchcreateretail 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/B2b_store_assistant.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessBatchCreateRetailAsync(this WechatApiClient client, Models.WxaBusinessBatchCreateRetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "business", "batchcreateretail") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/business/retailnotifybusiness 接口。 + /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/B2b_store_assistant.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaBusinessRetailNotifyBusinessAsync(this WechatApiClient client, Models.WxaBusinessRetailNotifyBusinessRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "business", "retailnotifybusiness") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailRequest.cs new file mode 100644 index 00000000..09c8f828 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailRequest.cs @@ -0,0 +1,100 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/batchcreateretail 接口的请求。 + /// + public class WxaBusinessBatchCreateRetailRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class RetailInfo + { + /// + /// 获取或设置一级类型。 + /// + [Newtonsoft.Json.JsonProperty("retail_type")] + [System.Text.Json.Serialization.JsonPropertyName("retail_type")] + public string RetailType { get; set; } = string.Empty; + + /// + /// 获取或设置二级类型。 + /// + [Newtonsoft.Json.JsonProperty("sub_retail_type")] + [System.Text.Json.Serialization.JsonPropertyName("sub_retail_type")] + public string? RetailSubType { get; set; } + + /// + /// 获取或设置门店名称。 + /// + [Newtonsoft.Json.JsonProperty("retail_name")] + [System.Text.Json.Serialization.JsonPropertyName("retail_name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置门店地址省份。 + /// + [Newtonsoft.Json.JsonProperty("address_province")] + [System.Text.Json.Serialization.JsonPropertyName("address_province")] + public string Province { get; set; } = string.Empty; + + /// + /// 获取或设置门店地址城市。 + /// + [Newtonsoft.Json.JsonProperty("address_city")] + [System.Text.Json.Serialization.JsonPropertyName("address_city")] + public string City { get; set; } = string.Empty; + + /// + /// 获取或设置门店地址区县。 + /// + [Newtonsoft.Json.JsonProperty("address_region")] + [System.Text.Json.Serialization.JsonPropertyName("address_region")] + public string District { get; set; } = string.Empty; + + /// + /// 获取或设置门店地址街道。 + /// + [Newtonsoft.Json.JsonProperty("address_street")] + [System.Text.Json.Serialization.JsonPropertyName("address_street")] + public string Street { get; set; } = string.Empty; + + /// + /// 获取或设置门店负责人的手机号。 + /// + [Newtonsoft.Json.JsonProperty("mobile_phone")] + [System.Text.Json.Serialization.JsonPropertyName("mobile_phone")] + public string Mobilephone { get; set; } = default!; + + /// + /// 获取或设置企业名称。 + /// + [Newtonsoft.Json.JsonProperty("biz_name")] + [System.Text.Json.Serialization.JsonPropertyName("biz_name")] + public string? BusinessName { get; set; } + + /// + /// 获取或设置营业执照注册号。 + /// + [Newtonsoft.Json.JsonProperty("registration_number")] + [System.Text.Json.Serialization.JsonPropertyName("registration_number")] + public string? RegistrationNumber { get; set; } + + /// + /// 获取或设置法人姓名。 + /// + [Newtonsoft.Json.JsonProperty("corporation_name")] + [System.Text.Json.Serialization.JsonPropertyName("corporation_name")] + public string? LegalPerson { get; set; } + } + } + + /// + /// 获取或设置门店信息列表。 + /// + [Newtonsoft.Json.JsonProperty("retail_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("retail_info_list")] + public IList RetailInfoList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailResponse.cs new file mode 100644 index 00000000..2e253c53 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailResponse.cs @@ -0,0 +1,56 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/batchcreateretail 接口的响应。 + /// + public class WxaBusinessBatchCreateRetailResponse : WechatApiResponse + { + public static class Types + { + public class Failure + { + /// + /// 获取或设置门店负责人的手机号。 + /// + [Newtonsoft.Json.JsonProperty("mobile_phone")] + [System.Text.Json.Serialization.JsonPropertyName("mobile_phone")] + public string Mobilephone { get; set; } = default!; + + /// + /// 获取或设置营业执照注册号。 + /// + [Newtonsoft.Json.JsonProperty("registration_number")] + [System.Text.Json.Serialization.JsonPropertyName("registration_number")] + public string? RegistrationNumber { get; set; } + + /// + /// 获取或设置失败原因编号。 + /// + [Newtonsoft.Json.JsonProperty("failure_code")] + [System.Text.Json.Serialization.JsonPropertyName("failure_code")] + public int FailureCode { get; set; } + } + } + + /// + /// 获取或设置成功数量。 + /// + [Newtonsoft.Json.JsonProperty("num_success")] + [System.Text.Json.Serialization.JsonPropertyName("num_success")] + public int SuccessfulCount { get; set; } + + /// + /// 获取或设置失败数量。 + /// + [Newtonsoft.Json.JsonProperty("num_failure")] + [System.Text.Json.Serialization.JsonPropertyName("num_failure")] + public int FailedCount { get; set; } + + /// + /// 获取或设置失败信息列表。 + /// + [Newtonsoft.Json.JsonProperty("failure_record_list")] + [System.Text.Json.Serialization.JsonPropertyName("failure_record_list")] + public Types.Failure[]? FailureList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoRequest.cs new file mode 100644 index 00000000..846bd347 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/getretailinfo 接口的请求。 + /// + public class WxaBusinessGetRetailInfoRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置门店负责人的 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置门店负责人的手机号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("mobile_phone")] + [System.Text.Json.Serialization.JsonPropertyName("mobile_phone")] + public string? Mobilephone { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoResponse.cs new file mode 100644 index 00000000..849a18dd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoResponse.cs @@ -0,0 +1,112 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/getretailinfo 接口的响应。 + /// + public class WxaBusinessGetRetailInfoResponse : WechatApiResponse + { + public static class Types + { + public class RetailInfo + { + /// + /// 获取或设置一级类型。 + /// + [Newtonsoft.Json.JsonProperty("retail_type")] + [System.Text.Json.Serialization.JsonPropertyName("retail_type")] + public string RetailType { get; set; } = default!; + + /// + /// 获取或设置二级类型。 + /// + [Newtonsoft.Json.JsonProperty("sub_retail_type")] + [System.Text.Json.Serialization.JsonPropertyName("sub_retail_type")] + public string RetailSubType { get; set; } = default!; + + /// + /// 获取或设置门店名称。 + /// + [Newtonsoft.Json.JsonProperty("retail_name")] + [System.Text.Json.Serialization.JsonPropertyName("retail_name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置门店地址。 + /// + [Newtonsoft.Json.JsonProperty("retail_address")] + [System.Text.Json.Serialization.JsonPropertyName("retail_address")] + public string Address { get; set; } = default!; + + /// + /// 获取或设置门店负责人的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置门店负责人的手机号。 + /// + [Newtonsoft.Json.JsonProperty("mobile_phone")] + [System.Text.Json.Serialization.JsonPropertyName("mobile_phone")] + public string Mobilephone { get; set; } = default!; + + /// + /// 获取或设置企业名称。 + /// + [Newtonsoft.Json.JsonProperty("principal")] + [System.Text.Json.Serialization.JsonPropertyName("principal")] + public string? BusinessName { get; set; } + + /// + /// 获取或设置营业执照注册号。 + /// + [Newtonsoft.Json.JsonProperty("identification")] + [System.Text.Json.Serialization.JsonPropertyName("identification")] + public string? RegistrationNumber { get; set; } + + /// + /// 获取或设置法人姓名。 + /// + [Newtonsoft.Json.JsonProperty("legal_person_name")] + [System.Text.Json.Serialization.JsonPropertyName("legal_person_name")] + public string? LegalPerson { get; set; } + + /// + /// 获取或设置认证方式。 + /// + [Newtonsoft.Json.JsonProperty("auth_mode")] + [System.Text.Json.Serialization.JsonPropertyName("auth_mode")] + public int AuthMode { get; set; } + + /// + /// 获取或设置认证状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置认证时间戳。 + /// + [Newtonsoft.Json.JsonProperty("auth_time")] + [System.Text.Json.Serialization.JsonPropertyName("auth_time")] + public long? AuthTimestamp { get; set; } + + /// + /// 获取或设置授权时间戳。 + /// + [Newtonsoft.Json.JsonProperty("grant_time")] + [System.Text.Json.Serialization.JsonPropertyName("grant_time")] + public long? GrantTimestamp { get; set; } + } + } + + /// + /// 获取或设置门店信息列表。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.RetailInfo[] RetailInfoList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessRequest.cs new file mode 100644 index 00000000..75ac2727 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessRequest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/retailnotifybusiness 接口的请求。 + /// + public class WxaBusinessRetailNotifyBusinessRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置消息类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置下发内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + + /// + /// 获取或设置门店负责人的 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("to_user_list")] + [System.Text.Json.Serialization.JsonPropertyName("to_user_list")] + public IList ToUserOpenIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessResponse.cs new file mode 100644 index 00000000..87687e75 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/business/retailnotifybusiness 接口的响应。 + /// + public class WxaBusinessRetailNotifyBusinessResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Midas/WxaBusinessGetPayForOrderRequest.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderRequest.cs rename to src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Midas/WxaBusinessGetPayForOrderRequest.cs diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Midas/WxaBusinessGetPayForOrderResponse.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderResponse.cs rename to src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Midas/WxaBusinessGetPayForOrderResponse.cs index 58340a26..dbf5af3d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/WxaBusinessGetPayForOrderResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/WxaBusiness/Midas/WxaBusinessGetPayForOrderResponse.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Models +namespace SKIT.FlurlHttpClient.Wechat.Api.Models { /// /// 表示 [POST] /wxa/business/getpayfororder 接口的响应。 @@ -56,7 +56,7 @@ /// [Newtonsoft.Json.JsonProperty("env")] [System.Text.Json.Serialization.JsonPropertyName("env")] - public string MidasEnv { get; set; } = default!; + public int MidasEnvironment { get; set; } /// /// 获取或设置支付时间戳。 diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailRequest.json new file mode 100644 index 00000000..5ca2f26e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailRequest.json @@ -0,0 +1,24 @@ +{ + "retail_info_list": [ + { + "mobile_phone": "12345678910", + "retail_name": "张三烧烤店", + "retail_type": "餐饮店", + "address_province": "广东省", + "address_city": "广州市", + "address_region": "海珠区", + "address_street": "新港中路397号TIT创意园" + }, + { + "mobile_phone": "a123456789", + "retail_type": "便利店", + "address_province": "广东省", + "address_city": "广州市", + "address_region": "海珠区", + "address_street": "新港中路397号TIT创意园", + "registration_number": "xxxxx", + "biz_name": "xxxxx", + "corporation_name": "xxxxx" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailResponse.json new file mode 100644 index 00000000..0bfabf7d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessBatchCreateRetailResponse.json @@ -0,0 +1,13 @@ +{ + "errcode": 0, + "errmsg": "ok", + "num_success": 1, + "num_failure": 1, + "failure_record_list": [ + { + "mobile_phone": "a123456789", + "registration_number": "", + "failure_code": 6 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoRequest.json new file mode 100644 index 00000000..15fd541e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoRequest.json @@ -0,0 +1,3 @@ +{ + "openid": "xxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoResponse.json new file mode 100644 index 00000000..5f5290f6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessGetRetailInfoResponse.json @@ -0,0 +1,21 @@ +{ + "errcode": 0, + "errmsg": "ok", + "info": [ + { + "mobile_phone": "12345678910", + "retail_type": "餐饮店", + "sub_retail_type": "", + "retail_address": "广东省广州市海珠区新港中路397号TIT创意园", + "retail_name": "张三烧烤店", + "identification": "100000000000000001", + "principal": "广州张三烧烤店", + "legal_person_name": "张*", + "openid": "xxxxxxxxxx", + "status": 1, + "auth_mode": 1, + "auth_time": 1655458898, + "grant_time": 1655458909 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessRequest.json new file mode 100644 index 00000000..3ef15b14 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/B2BStore/WxaBusinessRetailNotifyBusinessRequest.json @@ -0,0 +1,7 @@ +{ + "type": 7, + "content": "{}", + "to_user_list": [ + "xxxxxxxxxxxxxx" + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/Midas/WxaBusinessGetPayForOrderRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/Midas/WxaBusinessGetPayForOrderRequest.json new file mode 100644 index 00000000..cd91544b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/Midas/WxaBusinessGetPayForOrderRequest.json @@ -0,0 +1,5 @@ +{ + "appid": "", + "order_no": "", + "out_trade_no": "" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/Midas/WxaBusinessGetPayForOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/Midas/WxaBusinessGetPayForOrderResponse.json new file mode 100644 index 00000000..18a7326d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/WxaBusiness/Midas/WxaBusinessGetPayForOrderResponse.json @@ -0,0 +1,15 @@ +{ + "errcode": 0, + "errmsg": "ok", + "payfororder": { + "out_trade_no": "", + "order_no": "", + "openid": "", + "create_time": 123456, + "amount": 0, + "status": 0, + "zone_id": "", + "env": 0, + "pay_time": null + } +}