feat(tenpayv3): 新增微信支付分服务商场景中预授权接口

This commit is contained in:
Fu Diwei
2024-07-31 15:34:09 +08:00
parent 920176ce08
commit 0e8f123907
6 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payscore/partner/permissions/apply-for-scene 接口的请求。</para>
/// </summary>
public class ApplyPayScorePartnerPermissionsForSceneRequest : ApplyPayScorePartnerPermissionsRequest
{
public static class Types
{
public class TransactionSceneInfo
{
/// <summary>
/// 获取或设置微信商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("mchid")]
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
public string MerchantId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string SubMerchantId { get; set; } = string.Empty;
}
}
/// <summary>
/// 获取或设置授权场景。
/// </summary>
[Newtonsoft.Json.JsonProperty("scene")]
[System.Text.Json.Serialization.JsonPropertyName("scene")]
public string Scene { get; set; } = string.Empty;
/// <summary>
/// 获取或设置微信支付交易中授权附带的参数信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("transaction_scene_info")]
[System.Text.Json.Serialization.JsonPropertyName("transaction_scene_info")]
public Types.TransactionSceneInfo? TransactionSceneInfo { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payscore/partner/permissions/apply-for-scene 接口的响应。</para>
/// </summary>
public class ApplyPayScorePartnerPermissionsForSceneResponse : WechatTenpayResponse
{
/// <summary>
/// 获取或设置授权场景。
/// </summary>
[Newtonsoft.Json.JsonProperty("scene")]
[System.Text.Json.Serialization.JsonPropertyName("scene")]
public string Scene { get; set; } = default!;
/// <summary>
/// 获取或设置微信支付交易中授权 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("transaction_permissions_token")]
[System.Text.Json.Serialization.JsonPropertyName("transaction_permissions_token")]
public string? TransactionPermissionsToken { get; set; }
}
}