feat(wxapi): 新增第三方平台小程序微信认证相关接口

This commit is contained in:
Fu Diwei 2023-12-25 15:36:48 +08:00
parent e14d0dfe83
commit d9748b3330
24 changed files with 900 additions and 0 deletions

View File

@ -162,6 +162,7 @@
| :-: | :----------------: | :--: |
| √ | 视频号小店开放接口 | |
| √ | 视频号助手开放接口 | |
| √ | 接口管理 | |
</details>

View File

@ -0,0 +1,69 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 INFO.notify_3rd_wxa_auth 事件的数据。</para>
/// <para>https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_wxaauth.html </para>
/// </summary>
public class NotifyThirdPartyWxaAuthEvent : WechatApiEvent, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class DispatchInfo
{
/// <summary>
/// 获取或设置审核机构名称。
/// </summary>
[System.Xml.Serialization.XmlElement("provider")]
public string Provider { get; set; } = default!;
/// <summary>
/// 获取或设置审核机构联系方式。
/// </summary>
[System.Xml.Serialization.XmlElement("contact")]
public string Contact { get; set; } = default!;
/// <summary>
/// 获取或设置派单时间戳。
/// </summary>
[System.Xml.Serialization.XmlElement("dispatch_time")]
public long DispatchTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[System.Xml.Serialization.XmlElement("appid")]
public string AuthorizerAppId { get; set; } = default!;
/// <summary>
/// 获取或设置认证任务 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("taskid")]
public string TaskId { get; set; } = default!;
/// <summary>
/// 获取或设置认证任务状态。
/// </summary>
[System.Xml.Serialization.XmlElement("task_status")]
public int TaskStatus { get; set; }
/// <summary>
/// 获取或设置申请单状态。
/// </summary>
[System.Xml.Serialization.XmlElement("apply_status")]
public int ApplyStatus { get; set; }
/// <summary>
/// 获取或设置提醒消息内容。
/// </summary>
[System.Xml.Serialization.XmlElement("message", IsNullable = true)]
public string? Message { get; set; }
/// <summary>
/// 获取或设置派单信息。
/// </summary>
[System.Xml.Serialization.XmlElement("dispatch_info", IsNullable = true)]
public Types.DispatchInfo? DispatchInfo { get; set; }
}
}

View File

@ -0,0 +1,27 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 INFO.notify_3rd_wxa_wxverify 事件的数据。</para>
/// <para>https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_wxaauth.html </para>
/// </summary>
public class NotifyThirdPartyWxaVerifyEvent : WechatApiEvent, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[System.Xml.Serialization.XmlElement("appid")]
public string AuthorizerAppId { get; set; } = default!;
/// <summary>
/// 获取或设置认证过期时间戳。
/// </summary>
[System.Xml.Serialization.XmlElement("expired")]
public long ExpireTimestamp { get; set; }
/// <summary>
/// 获取或设置提醒消息内容。
/// </summary>
[System.Xml.Serialization.XmlElement("message", IsNullable = true)]
public string? Message { get; set; }
}
}

View File

@ -9,6 +9,109 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
{
public static class WechatApiClientExecuteWxaSecExtensions
{
#region Auth
/// <summary>
/// <para>异步调用 [POST] /wxa/sec/wxaauth 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_wxaauth.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaSecWxaAuthResponse> ExecuteWxaSecWxaAuthAsync(this WechatApiClient client, Models.WxaSecWxaAuthRequest 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", "sec", "wxaauth")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.WxaSecWxaAuthResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /wxa/sec/reauth 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_reauth.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaSecReauthResponse> ExecuteWxaSecReauthAsync(this WechatApiClient client, Models.WxaSecReauthRequest 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", "sec", "reauth")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.WxaSecReauthResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /wxa/sec/queryauth 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_queryauth.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaSecQueryAuthResponse> ExecuteWxaSecQueryAuthAsync(this WechatApiClient client, Models.WxaSecQueryAuthRequest 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", "sec", "queryauth")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.WxaSecQueryAuthResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /wxa/sec/uploadauthmaterial 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_uploadauthmaterial.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaSecUploadAuthMaterialResponse> ExecuteWxaSecUploadAuthMaterialAsync(this WechatApiClient client, Models.WxaSecUploadAuthMaterialRequest 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", "sec", "uploadauthmaterial")
.SetQueryParam("access_token", request.AccessToken);
using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: "media.png", fileBytes: request.FileBytes, fileContentType: "image/png", formDataName: "media");
return await client.SendRequestAsync<Models.WxaSecUploadAuthMaterialResponse>(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /wxa/sec/authidentitytree 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/weapp-wxverify/secwxaapi_authidentitytree.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaSecAuthIdentityTreeResponse> ExecuteWxaSecAuthIdentityTreeAsync(this WechatApiClient client, Models.WxaSecAuthIdentityTreeRequest 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", "sec", "authidentitytree")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.WxaSecAuthIdentityTreeResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region Order
/// <summary>
/// <para>异步调用 [POST] /wxa/sec/order/upload_shipping_info 接口。</para>

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/authidentitytree 接口的请求。</para>
/// </summary>
public class WxaSecAuthIdentityTreeRequest : WechatApiRequest, IInferable<WxaSecAuthIdentityTreeRequest, WxaSecAuthIdentityTreeResponse>
{
}
}

View File

@ -0,0 +1,79 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/authidentitytree 接口的响应。</para>
/// </summary>
public class WxaSecAuthIdentityTreeResponse : WechatApiResponse
{
public static class Types
{
public class IdentityTreeNode
{
public static class Types
{
public class RootInfo
{
/// <summary>
/// 获取或设置类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public int Type { get; set; }
}
public class LeafInfo
{
/// <summary>
/// 获取或设置需求。
/// </summary>
[Newtonsoft.Json.JsonProperty("requirement")]
[System.Text.Json.Serialization.JsonPropertyName("requirement")]
public string? Requirement { get; set; }
}
}
/// <summary>
/// 获取或设置节点 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("node_id")]
[System.Text.Json.Serialization.JsonPropertyName("node_id")]
public int NodeId { get; set; }
/// <summary>
/// 获取或设置节点名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string NodeName { get; set; } = default!;
/// <summary>
/// 获取或设置子节点列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("node_list")]
[System.Text.Json.Serialization.JsonPropertyName("node_list")]
public IdentityTreeNode[]? NodeList { get; set; }
/// <summary>
/// 获取或设置根节点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("root_info")]
[System.Text.Json.Serialization.JsonPropertyName("root_info")]
public Types.RootInfo? RootInfo { get; set; }
/// <summary>
/// 获取或设置叶子节点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("leaf_info")]
[System.Text.Json.Serialization.JsonPropertyName("leaf_info")]
public Types.LeafInfo? LeafInfo { get; set; }
}
}
/// <summary>
/// 获取或设置职业树节点列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("identity_tree_list")]
[System.Text.Json.Serialization.JsonPropertyName("identity_tree_list")]
public Types.IdentityTreeNode[] IdentityTreeList { get; set; } = default!;
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/queryauth 接口的请求。</para>
/// </summary>
public class WxaSecQueryAuthRequest : WechatApiRequest, IInferable<WxaSecQueryAuthRequest, WxaSecQueryAuthResponse>
{
/// <summary>
/// 获取或设置认证任务 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("taskid")]
[System.Text.Json.Serialization.JsonPropertyName("taskid")]
public string TaskId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,43 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/queryauth 接口的响应。</para>
/// </summary>
public class WxaSecQueryAuthResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置认证任务状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("task_status")]
[System.Text.Json.Serialization.JsonPropertyName("task_status")]
public int TaskStatus { get; set; }
/// <summary>
/// 获取或设置审核单状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_status")]
[System.Text.Json.Serialization.JsonPropertyName("apply_status")]
public int ApplyStatus { get; set; }
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string AppId { get; set; } = default!;
/// <summary>
/// 获取或设置打回重填原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("refill_reason")]
[System.Text.Json.Serialization.JsonPropertyName("refill_reason")]
public string? RefillReason { get; set; }
/// <summary>
/// 获取或设置审核失败原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("fail_reason")]
[System.Text.Json.Serialization.JsonPropertyName("fail_reason")]
public string? FailReason { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/reauth 接口的请求。</para>
/// </summary>
public class WxaSecReauthRequest : WxaSecWxaAuthRequest, IInferable<WxaSecReauthRequest, WxaSecReauthResponse>
{
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/reauth 接口的响应。</para>
/// </summary>
public class WxaSecReauthResponse : WxaSecWxaAuthResponse
{
}
}

View File

@ -0,0 +1,17 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/uploadauthmaterial 接口的请求。</para>
/// </summary>
public class WxaSecUploadAuthMaterialRequest : WechatApiRequest, IInferable<WxaSecUploadAuthMaterialRequest, WxaSecUploadAuthMaterialResponse>
{
/// <summary>
/// 获取或设置文件字节数组。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public byte[] FileBytes { get; set; } = Array.Empty<byte>();
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/uploadauthmaterial 接口的响应。</para>
/// </summary>
public class WxaSecUploadAuthMaterialResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public string? Type { get; set; }
/// <summary>
/// 获取或设置 MediaId。
/// </summary>
[Newtonsoft.Json.JsonProperty("mediaid")]
[System.Text.Json.Serialization.JsonPropertyName("mediaid")]
public string MediaId { get; set; } = default!;
}
}

View File

@ -0,0 +1,286 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/wxaauth 接口的请求。</para>
/// </summary>
public class WxaSecWxaAuthRequest : WechatApiRequest, IInferable<WxaSecWxaAuthRequest, WxaSecWxaAuthResponse>
{
public static class Types
{
public class AuthData
{
public static class Types
{
public class Contact
{
/// <summary>
/// 获取或设置认证联系人姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 获取或设置认证联系人邮箱。
/// </summary>
[Newtonsoft.Json.JsonProperty("email")]
[System.Text.Json.Serialization.JsonPropertyName("email")]
public string Email { get; set; } = string.Empty;
}
public class Invoice
{
public static class Types
{
public class ElectronicInfo
{
/// <summary>
/// 获取或设置纳税识别号。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public string TaxNumber { get; set; } = string.Empty;
/// <summary>
/// 获取或设置发票备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc")]
[System.Text.Json.Serialization.JsonPropertyName("desc")]
public string? Description { get; set; }
}
public class VATInfo
{
/// <summary>
/// 获取或设置纳税识别号。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public string TaxNumber { get; set; } = string.Empty;
/// <summary>
/// 获取或设置企业电话。
/// </summary>
[Newtonsoft.Json.JsonProperty("enterprise_phone")]
[System.Text.Json.Serialization.JsonPropertyName("enterprise_phone")]
public string EnterprisePhoneNumber { get; set; } = string.Empty;
/// <summary>
/// 获取或设置企业注册地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("enterprise_address")]
[System.Text.Json.Serialization.JsonPropertyName("enterprise_address")]
public string EnterpriseAddress { get; set; } = string.Empty;
/// <summary>
/// 获取或设置企业开户银行。
/// </summary>
[Newtonsoft.Json.JsonProperty("bank_name")]
[System.Text.Json.Serialization.JsonPropertyName("bank_name")]
public string BankName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置企业银行账号。
/// </summary>
[Newtonsoft.Json.JsonProperty("bank_account")]
[System.Text.Json.Serialization.JsonPropertyName("bank_account")]
public string BankAccount { get; set; } = string.Empty;
/// <summary>
/// 获取或设置邮寄地址邮编。
/// </summary>
[Newtonsoft.Json.JsonProperty("mailing_address")]
[System.Text.Json.Serialization.JsonPropertyName("mailing_address")]
public string? MailingPostcode { get; set; }
/// <summary>
/// 获取或设置邮寄地址省份。
/// </summary>
[Newtonsoft.Json.JsonProperty("province")]
[System.Text.Json.Serialization.JsonPropertyName("province")]
public string? MailingProvince { get; set; }
/// <summary>
/// 获取或设置邮寄地址城市。
/// </summary>
[Newtonsoft.Json.JsonProperty("city")]
[System.Text.Json.Serialization.JsonPropertyName("city")]
public string? MailingCity { get; set; }
/// <summary>
/// 获取或设置邮寄地址区县。
/// </summary>
[Newtonsoft.Json.JsonProperty("district")]
[System.Text.Json.Serialization.JsonPropertyName("district")]
public string? MailingDistrict { get; set; }
/// <summary>
/// 获取或设置邮寄地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string? MailingAddress { get; set; }
/// <summary>
/// 获取或设置邮寄联系人。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string? MailingContactName { get; set; }
/// <summary>
/// 获取或设置邮寄联系电话。
/// </summary>
[Newtonsoft.Json.JsonProperty("phone")]
[System.Text.Json.Serialization.JsonPropertyName("phone")]
public string? MailingContactPhoneNumber { get; set; }
/// <summary>
/// 获取或设置发票备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc")]
[System.Text.Json.Serialization.JsonPropertyName("desc")]
public string? Description { get; set; }
}
}
/// <summary>
/// 获取或设置发票类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("invoice_type")]
[System.Text.Json.Serialization.JsonPropertyName("invoice_type")]
public int InvoiceType { get; set; }
/// <summary>
/// 获取或设置发票抬头。
/// </summary>
[Newtonsoft.Json.JsonProperty("invoice_title")]
[System.Text.Json.Serialization.JsonPropertyName("invoice_title")]
public string? InvoiceTitle { get; set; }
/// <summary>
/// 获取或设置电子发票开票信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("electronic")]
[System.Text.Json.Serialization.JsonPropertyName("electronic")]
public Types.ElectronicInfo? ElectronicInfo { get; set; }
/// <summary>
/// 获取或设置增值税专票开票信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("vat")]
[System.Text.Json.Serialization.JsonPropertyName("vat")]
public Types.VATInfo? VATInfo { get; set; }
}
}
/// <summary>
/// 获取或设置客户类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("customer_type")]
[System.Text.Json.Serialization.JsonPropertyName("customer_type")]
public int CustomerType { get; set; }
/// <summary>
/// 获取或设置认证任务 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("taskid")]
[System.Text.Json.Serialization.JsonPropertyName("taskid")]
public string? TaskId { get; set; }
/// <summary>
/// 获取或设置联系人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("contact_info")]
[System.Text.Json.Serialization.JsonPropertyName("contact_info")]
public Types.Contact Contact { get; set; } = new Types.Contact();
/// <summary>
/// 获取或设置主体资质材料 MediaId。
/// </summary>
[Newtonsoft.Json.JsonProperty("qualification")]
[System.Text.Json.Serialization.JsonPropertyName("qualification")]
public string? QualificationMediaId { get; set; }
/// <summary>
/// 获取或设置主体资质其他材料 MediaId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("qualification_other")]
[System.Text.Json.Serialization.JsonPropertyName("qualification_other")]
public IList<string>? QualificationOtherMediaIdList { get; set; }
/// <summary>
/// 获取或设置小程序账号名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("account_name")]
[System.Text.Json.Serialization.JsonPropertyName("account_name")]
public string AccountName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置小程序账号名称命名类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("account_name_type")]
[System.Text.Json.Serialization.JsonPropertyName("account_name_type")]
public int AccountNameType { get; set; }
/// <summary>
/// 获取或设置名称命中关键词补充材料 MediaId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("account_supplemental")]
[System.Text.Json.Serialization.JsonPropertyName("account_supplemental")]
public IList<string>? AccountSupplementalMediaIdList { get; set; }
/// <summary>
/// 获取或设置支付方式。
/// </summary>
[Newtonsoft.Json.JsonProperty("pay_type")]
[System.Text.Json.Serialization.JsonPropertyName("pay_type")]
public int PayType { get; set; }
/// <summary>
/// 获取或设置发票信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("invoice_info")]
[System.Text.Json.Serialization.JsonPropertyName("invoice_info")]
public Types.Invoice? Invoice { get; set; }
/// <summary>
/// 获取或设置要认证的身份。
/// </summary>
[Newtonsoft.Json.JsonProperty("auth_identification")]
[System.Text.Json.Serialization.JsonPropertyName("auth_identification")]
public string? AuthIdentification { get; set; }
/// <summary>
/// 获取或设置身份证明材料 MediaId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("auth_ident_material")]
[System.Text.Json.Serialization.JsonPropertyName("auth_ident_material")]
public IList<string>? AuthIdentificationMaterialIdList { get; set; }
/// <summary>
/// 获取或设置第三方联系电话。
/// </summary>
[Newtonsoft.Json.JsonProperty("third_party_phone")]
[System.Text.Json.Serialization.JsonPropertyName("third_party_phone")]
public string? ThirdPartyPhoneNumber { get; set; }
/// <summary>
/// 获取或设置服务市场 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("service_appid")]
[System.Text.Json.Serialization.JsonPropertyName("service_appid")]
public string? ServiceAppId { get; set; }
}
}
/// <summary>
/// 获取或设置认证信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("auth_data")]
[System.Text.Json.Serialization.JsonPropertyName("auth_data")]
public Types.AuthData AuthData { get; set; } = new Types.AuthData();
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxa/sec/wxaauth 接口的响应。</para>
/// </summary>
public class WxaSecWxaAuthResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置认证任务 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("taskid")]
[System.Text.Json.Serialization.JsonPropertyName("taskid")]
public string TaskId { get; set; } = default!;
/// <summary>
/// 获取或设置授权链接。
/// </summary>
[Newtonsoft.Json.JsonProperty("auth_url")]
[System.Text.Json.Serialization.JsonPropertyName("auth_url")]
public string? AuthUrl { get; set; }
}
}

View File

@ -0,0 +1,15 @@
<xml>
<AppId><![CDATA[wx31f828cesdfa4eabc]]></AppId>
<CreateTime>1700634212</CreateTime>
<InfoType><![CDATA[notify_3rd_wxa_auth]]></InfoType>
<appid><![CDATA[wxaf614423g25ffd9b]]></appid>
<task_status>0</task_status>
<message><![CDATA[资料检验成功,等待管理员授权]]></message>
<taskid><![CDATA[048ae3f93e664053baf8cd1e1a899896]]></taskid>
<apply_status>0</apply_status>
<dispatch_info>
<provider><![CDATA[上海倍通企业信用征信有限公司(测试)]]></provider>
<contact><![CDATA[热线电话0086-13249064176咨询时间周一至周五工作日830-1730。]]></contact>
<dispatch_time>1700619300</dispatch_time>
</dispatch_info>
</xml>

View File

@ -0,0 +1,12 @@
<xml>
<AppId><![CDATA[wx31f828cesdfa4eabc]]></AppId>
<CreateTime>1700634212</CreateTime>
<InfoType><![CDATA[notify_3rd_wxa_wxverify]]></InfoType>
<appid><![CDATA[wxaf614423g25ffd9b]]></appid>
<expired>1704162245</expired>
<message>
<![CDATA[账号名称: 我的小程序名
到期时间: 2024年1月2日
详情: 账号已进入年审期,为确保运营主体经营状态存续、命名合规、行业资质真实有效且线上服务可用,请尽快完成认证年审。 到期未完成年审将影响新版本发布和“被搜索”能力。逾期 30 天将影响“被分享”能力,逾期 60 天将影响新用户访问及支付功能。]]>
</message>
</xml>

View File

@ -0,0 +1,54 @@
{
"identity_tree_list": [
{
"name": "职业身份认证",
"node_id": 1,
"node_list": [
{
"name": "娱乐",
"node_id": 2,
"node_list": [
{
"name": "影视",
"node_id": 3,
"node_list": [
{
"leaf_info": {
"requirement": "认证需上传本人有效身份证件同时提供以下任一材料1、获得导演相关职称..."
},
"name": "导演",
"node_id": 4
},
{
"leaf_info": {
"requirement": "认证需上传本人有效身份证件,同时提供以下任一材料..."
},
"name": "编导",
"node_id": 5
}
]
},
{
"name": "音乐",
"node_id": 17,
"node_list": [
{
"leaf_info": {
"requirement": "认证需上传本人有效身份证件同时提供以下任一材料1、唱片公司或演艺公司签约歌手..."
},
"name": "歌手",
"node_id": 18
}
]
}
]
}
],
"root_info": {
"type": 1
}
}
],
"errcode": 0,
"errmsg": ""
}

View File

@ -0,0 +1,7 @@
{
"errcode": 0,
"errmsg": "",
"task_status": 15,
"apply_status": 0,
"appid": "wx123123123123123"
}

View File

@ -0,0 +1,42 @@
{
"auth_data": {
"taskid": "xxxxxx",
"account_name": "",
"account_name_type": 0,
"account_supplemental": [ "", "" ],
"auth_ident_material": [ "", "" ],
"auth_identification": "",
"contact_info": {
"email": "认证联系人电子信箱",
"name": "认证联系人姓名"
},
"invoice_info": {
"electronic": {
"desc": "电子发票信息-发票备注(选填)",
"id": "电子发票信息-纳税识别号15位、17、18或20位"
},
"invoice_type": 0,
"vat": {
"address": "增值税专票-街道地址xx省xx市xx区xxxx",
"bank_account": "增值税专票-企业银行账号",
"bank_name": "增值税专票-企业开户银行",
"enterprise_address": "增值税专票-企业注册地址",
"enterprise_phone": "增值税专票-企业电话",
"id": "增值税专票-纳税识别号15位、17、18或20位",
"mailing_address": "增值税专票-发票邮寄地址邮编",
"name": "增值税专票-联系人",
"phone": "增值税专票-联系电话",
"province": "广东省",
"city": "广州市",
"district": "海珠区",
"desc": "发票备注,选填"
}
},
"pay_type": 0,
"qualification": "",
"qualification_other": [ "", "" ],
"third_party_phone": ""
}
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "",
"taskid": ""
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"mediaid": "xxxxxxxxxxxxxxxxx"
}

View File

@ -0,0 +1,41 @@
{
"auth_data": {
"account_name": "",
"account_name_type": 0,
"account_supplemental": [ "", "" ],
"auth_ident_material": [ "", "" ],
"auth_identification": "",
"customer_type": 15,
"contact_info": {
"email": "认证联系人电子信箱",
"name": "认证联系人姓名"
},
"invoice_info": {
"electronic": {
"desc": "电子发票信息-发票备注(选填)",
"id": "电子发票信息-纳税识别号15位、17、18或20位"
},
"invoice_type": 0,
"vat": {
"address": "增值税专票-街道地址xx省xx市xx区xxxx",
"bank_account": "增值税专票-企业银行账号",
"bank_name": "增值税专票-企业开户银行",
"enterprise_address": "增值税专票-企业注册地址",
"enterprise_phone": "增值税专票-企业电话",
"id": "增值税专票-纳税识别号15位、17、18或20位",
"mailing_address": "增值税专票-发票邮寄地址邮编",
"name": "增值税专票-联系人",
"phone": "增值税专票-联系电话",
"province": "广东省",
"city": "广州市",
"district": "海珠区",
"desc": "发票备注,选填"
}
},
"pay_type": 0,
"qualification": "",
"qualification_other": [ "", "" ],
"service_appid": "",
"third_party_phone": ""
}
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "",
"taskid": ""
}