feat(tenpayv3): 新增电商订单实名信息校验接口

This commit is contained in:
Fu Diwei
2025-03-14 10:02:20 +08:00
parent 17b8478115
commit c07b2ff1d5
6 changed files with 175 additions and 8 deletions

View File

@@ -0,0 +1,42 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /realname/verify 接口的请求。</para>
/// </summary>
[WechatTenpaySensitive]
public class GetRealNameVerificationRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置下单用户证件类型。
/// <para>默认值:"1"</para>
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string CredentialType { get; set; } = "1";
/// <summary>
/// 获取或设置下单用户证件号(需使用平台公钥/证书加密)。
/// </summary>
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_RSA_2048_WITH_SHA256, algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS8_OAEP_WITH_SHA1_AND_MGF1)]
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_SM2_WITH_SM3, algorithm: Constants.EncryptionAlgorithms.SM2_C1C3C2_ASN1)]
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string CredentialId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置下单用户姓名(需使用平台公钥/证书加密)。
/// </summary>
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_RSA_2048_WITH_SHA256, algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS8_OAEP_WITH_SHA1_AND_MGF1)]
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_SM2_WITH_SM3, algorithm: Constants.EncryptionAlgorithms.SM2_C1C3C2_ASN1)]
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string CredentialName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置微信支付交易单号。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string TransactionId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /realname/verify 接口的响应。</para>
/// </summary>
public class GetRealNameVerificationResponse : WechatTenpayResponse
{
/// <summary>
/// 获取或设置实名比对结果。
/// </summary>
[Newtonsoft.Json.JsonProperty("verify_result")]
[System.Text.Json.Serialization.JsonPropertyName("verify_result")]
public int VerifyResult { get; set; }
/// <summary>
/// 获取或设置实名比对错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("err_message")]
[System.Text.Json.Serialization.JsonPropertyName("err_message")]
public string? VerifyErrorMessage { get; set; }
}
}