mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 09:54:44 +08:00
feat(tenpayv3): 新增微信分付商户贴息相关接口
This commit is contained in:
@@ -4,7 +4,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
/// <para>表示 TRANSACTION.SUCCESS 通知的数据。</para>
|
/// <para>表示 TRANSACTION.SUCCESS 通知的数据。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012166360 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012158598 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012158598 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012167493 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012231898 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012231898 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4015124358 ]]>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4015124358 ]]>
|
||||||
/// </para>
|
/// </para>
|
||||||
@@ -24,6 +26,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
public class Payer : Models.GetCombineTransactionByCombineOutTradeNumberResponse.Types.Payer
|
public class Payer : Models.GetCombineTransactionByCombineOutTradeNumberResponse.Types.Payer
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Installment : Models.GetCombineTransactionByCombineOutTradeNumberResponse.Types.Installment
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -74,5 +80,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
[Newtonsoft.Json.JsonProperty("scene_info")]
|
[Newtonsoft.Json.JsonProperty("scene_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("scene_info")]
|
||||||
public Types.Scene? Scene { get; set; }
|
public Types.Scene? Scene { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分期信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("installment_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("installment_info")]
|
||||||
|
public Types.Installment? Installment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
public class Promotion : Models.GetPayTransactionByOutTradeNumberResponse.Types.Promotion
|
public class Promotion : Models.GetPayTransactionByOutTradeNumberResponse.Types.Promotion
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Installment : Models.GetPayTransactionByOutTradeNumberResponse.Types.Installment
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -135,5 +139,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||||
public Types.Promotion[]? PromotionList { get; set; }
|
public Types.Promotion[]? PromotionList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分期信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("installment_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("installment_info")]
|
||||||
|
public Types.Installment? Installment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
public class Promotion : Models.GetPayPartnerTransactionByOutTradeNumberResponse.Types.Promotion
|
public class Promotion : Models.GetPayPartnerTransactionByOutTradeNumberResponse.Types.Promotion
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Installment : Models.GetPayPartnerTransactionByOutTradeNumberResponse.Types.Installment
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -149,5 +153,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
|||||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||||
public Types.Promotion[]? PromotionList { get; set; }
|
public Types.Promotion[]? PromotionList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分期信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("installment_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("installment_info")]
|
||||||
|
public Types.Installment? Installment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
/// <para>异步调用 [POST] /combine-transactions/app 接口。</para>
|
/// <para>异步调用 [POST] /combine-transactions/app 接口。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012545465 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556944 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556944 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012707307 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758021 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758021 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760622 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760622 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4015001933 ]]>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4015001933 ]]>
|
||||||
@@ -49,8 +51,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
/// <para>异步调用 [POST] /combine-transactions/jsapi 接口。</para>
|
/// <para>异步调用 [POST] /combine-transactions/jsapi 接口。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012545654 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556926 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556926 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556931 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556931 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012707323 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012757938 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012757938 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758246 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758246 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760615 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760615 ]]> <br/>
|
||||||
@@ -88,7 +92,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
/// <para>异步调用 [POST] /combine-transactions/h5 接口。</para>
|
/// <para>异步调用 [POST] /combine-transactions/h5 接口。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012545879 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556961 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556961 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012707565 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758208 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758208 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760626 ]]>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760626 ]]>
|
||||||
/// </para>
|
/// </para>
|
||||||
@@ -124,7 +130,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
/// <para>异步调用 [POST] /combine-transactions/native 接口。</para>
|
/// <para>异步调用 [POST] /combine-transactions/native 接口。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012547310 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556982 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012556982 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012708704 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758240 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012758240 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760629 ]]>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012760629 ]]>
|
||||||
/// </para>
|
/// </para>
|
||||||
@@ -194,7 +202,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
/// <para>异步调用 [GET] /combine-transactions/out-trade-no/{combine_out_trade_no} 接口。</para>
|
/// <para>异步调用 [GET] /combine-transactions/out-trade-no/{combine_out_trade_no} 接口。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012551745 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012557006 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012557006 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012708988 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761049 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761049 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761057 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761057 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012602253 ]]>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012602253 ]]>
|
||||||
@@ -241,7 +251,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
/// <para>异步调用 [POST] /combine-transactions/out-trade-no/{combine_out_trade_no}/close 接口。</para>
|
/// <para>异步调用 [POST] /combine-transactions/out-trade-no/{combine_out_trade_no}/close 接口。</para>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// REF: <br/>
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012551793 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012577452 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4012577452 ]]> <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012709095 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761079 ]]> <br/>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761079 ]]> <br/>
|
||||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761093 ]]>
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4012761093 ]]>
|
||||||
/// </para>
|
/// </para>
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Flurl;
|
||||||
|
using Flurl.Http;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||||
|
{
|
||||||
|
public static class WechatTenpayClientExecutePayInstallmentExtensions
|
||||||
|
{
|
||||||
|
#region Exposure
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /pay/instal/exposure 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4016196762 ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.CreatePayInstallmentExposureResponse> ExecuteCreatePayInstallmentExposureAsync(this WechatTenpayClient client, Models.CreatePayInstallmentExposureRequest 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 is null)
|
||||||
|
request.MerchantId = client.Credentials.MerchantId;
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "pay", "instal", "exposure");
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.CreatePayInstallmentExposureResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Flurl.Http;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||||
|
{
|
||||||
|
public static class WechatTenpayClientExecutePayPartnerInstallmentExtensions
|
||||||
|
{
|
||||||
|
#region Exposure
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /pay/instal/partner/exposure 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/partner/4016196820 ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.CreatePayPartnerInstallmentExposureResponse> ExecuteCreatePayPartnerInstallmentExposureAsync(this WechatTenpayClient client, Models.CreatePayPartnerInstallmentExposureRequest 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 is null)
|
||||||
|
request.MerchantId = client.Credentials.MerchantId;
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "pay", "instal", "partner", "exposure");
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.CreatePayPartnerInstallmentExposureResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /combine-transactions/app 接口的请求。</para>
|
/// <para>表示 [POST] /combine-transactions/app 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[WechatTenpaySensitive]
|
||||||
public class CreateCombineTransactionAppRequest : WechatTenpayRequest
|
public class CreateCombineTransactionAppRequest : WechatTenpayRequest
|
||||||
{
|
{
|
||||||
public static class Types
|
public static class Types
|
||||||
@@ -70,6 +71,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
public string? SubAppId { get; set; }
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品服务类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("order_service_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("order_service_type")]
|
||||||
|
public string? OrderServiceType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置个人收款方受理授权 ID。
|
/// 获取或设置个人收款方受理授权 ID。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -129,6 +137,37 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
public class Payer
|
public class Payer
|
||||||
{
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Identity
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置证件类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||||
|
public string? IdentityType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置证件姓名(需使用平台公钥/证书加密)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||||
|
[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)]
|
||||||
|
public string? IdName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置证件号码(需使用平台公钥/证书加密)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("number")]
|
||||||
|
[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)]
|
||||||
|
public string? IdNumber { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置用户唯一标识。
|
/// 获取或设置用户唯一标识。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -142,6 +181,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
[Newtonsoft.Json.JsonProperty("sub_openid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_openid")]
|
||||||
public string? SubOpenId { get; set; }
|
public string? SubOpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置实名支付信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("identity")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("identity")]
|
||||||
|
public Types.Identity? Identity { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Scene
|
public class Scene
|
||||||
@@ -160,6 +206,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
||||||
public string? DeviceId { get; set; }
|
public string? DeviceId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Subsidy : CreatePayTransactionAppRequest.Types.Subsidy
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -235,5 +285,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("trade_scenario")]
|
[Newtonsoft.Json.JsonProperty("trade_scenario")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scenario")]
|
[System.Text.Json.Serialization.JsonPropertyName("trade_scenario")]
|
||||||
public string? TradeScenario { get; set; }
|
public string? TradeScenario { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_info")]
|
||||||
|
public Types.Subsidy? Subsidy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /combine-transactions/h5 接口的请求。</para>
|
/// <para>表示 [POST] /combine-transactions/h5 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[WechatTenpaySensitive]
|
||||||
public class CreateCombineTransactionH5Request : WechatTenpayRequest
|
public class CreateCombineTransactionH5Request : WechatTenpayRequest
|
||||||
{
|
{
|
||||||
public static class Types
|
public static class Types
|
||||||
@@ -14,6 +15,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Payer : CreateCombineTransactionAppRequest.Types.Payer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public class Scene : CreateCombineTransactionAppRequest.Types.Scene
|
public class Scene : CreateCombineTransactionAppRequest.Types.Scene
|
||||||
{
|
{
|
||||||
public static class Types
|
public static class Types
|
||||||
@@ -85,6 +90,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_orders")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_orders")]
|
||||||
public IList<Types.SubOrder> SubOrderList { get; set; } = new List<Types.SubOrder>();
|
public IList<Types.SubOrder> SubOrderList { get; set; } = new List<Types.SubOrder>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置支付者信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("combine_payer_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("combine_payer_info")]
|
||||||
|
public Types.Payer? CombinePayer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置场景信息。
|
/// 获取或设置场景信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /combine-transactions/jsapi 接口的请求。</para>
|
/// <para>表示 [POST] /combine-transactions/jsapi 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[WechatTenpaySensitive]
|
||||||
public class CreateCombineTransactionJsapiRequest : WechatTenpayRequest
|
public class CreateCombineTransactionJsapiRequest : WechatTenpayRequest
|
||||||
{
|
{
|
||||||
public static class Types
|
public static class Types
|
||||||
@@ -21,6 +22,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
public class Scene : CreateCombineTransactionAppRequest.Types.Scene
|
public class Scene : CreateCombineTransactionAppRequest.Types.Scene
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Subsidy : CreateCombineTransactionAppRequest.Types.Subsidy
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -96,5 +101,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("trade_scenario")]
|
[Newtonsoft.Json.JsonProperty("trade_scenario")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scenario")]
|
[System.Text.Json.Serialization.JsonPropertyName("trade_scenario")]
|
||||||
public string? TradeScenario { get; set; }
|
public string? TradeScenario { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_info")]
|
||||||
|
public Types.Subsidy? Subsidy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Payer : CreateCombineTransactionAppRequest.Types.Payer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public class Scene : CreateCombineTransactionAppRequest.Types.Scene
|
public class Scene : CreateCombineTransactionAppRequest.Types.Scene
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -72,6 +76,13 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_orders")]
|
[System.Text.Json.Serialization.JsonPropertyName("sub_orders")]
|
||||||
public IList<Types.SubOrder> SubOrderList { get; set; } = new List<Types.SubOrder>();
|
public IList<Types.SubOrder> SubOrderList { get; set; } = new List<Types.SubOrder>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置支付者信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("combine_payer_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("combine_payer_info")]
|
||||||
|
public Types.Payer? CombinePayer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置场景信息。
|
/// 获取或设置场景信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
||||||
public string? DeviceId { get; set; }
|
public string? DeviceId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Installment : GetPayTransactionByOutTradeNumberResponse.Types.Installment
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -229,5 +233,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("trade_scenario")]
|
[Newtonsoft.Json.JsonProperty("trade_scenario")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scenario")]
|
[System.Text.Json.Serialization.JsonPropertyName("trade_scenario")]
|
||||||
public string? TradeScenario { get; set; }
|
public string? TradeScenario { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分期信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("installment_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("installment_info")]
|
||||||
|
public Types.Installment? Installment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /pay/instal/exposure 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CreatePayInstallmentExposureRequest : WechatTenpayRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信商户号。如果不指定将使用构造 <see cref="WechatTenpayClient"/> 时的 <see cref="WechatTenpayClientOptions.MerchantId"/> 参数。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||||
|
public string? MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信 AppId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
|
public string AppId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID 类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("user_id_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("user_id_type")]
|
||||||
|
public string UserIdType { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户唯一标识。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("openid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||||
|
public string? OpenId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置手机号哈希值。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("phone_number_hash")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("phone_number_hash")]
|
||||||
|
public string? PhoneNumberHash { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /pay/instal/exposure 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CreatePayInstallmentExposureResponse : WechatTenpayResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否建议曝光微信分付。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("recommend_exposure")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("recommend_exposure")]
|
||||||
|
public bool IsRecommendExposed { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -181,6 +181,56 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("subsidy_amount")]
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_amount")]
|
||||||
public int? SubsidyAmount { get; set; }
|
public int? SubsidyAmount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Subsidy
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class SubsidyDetail
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class SubsidyPlan
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息期数。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_installment_num")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_installment_num")]
|
||||||
|
public int SubsidyInstallmentNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息百分比。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_percent")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_percent")]
|
||||||
|
public int SubsidyPercent { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置还款类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_period_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_period_type")]
|
||||||
|
public string SubsidyPeriodType { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置还款计划列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_plan")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_plan")]
|
||||||
|
public IList<Types.SubsidyPlan> SubsidyPlanList { get; set; } = new List<Types.SubsidyPlan>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息详情列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_detail")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_detail")]
|
||||||
|
public IList<Types.SubsidyDetail>? SubsidyDetailList { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -275,5 +325,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("settle_info")]
|
[Newtonsoft.Json.JsonProperty("settle_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
||||||
public Types.Settlement? Settlement { get; set; }
|
public Types.Settlement? Settlement { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_info")]
|
||||||
|
public Types.Subsidy? Subsidy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
public class Settlement : CreatePayTransactionAppRequest.Types.Settlement
|
public class Settlement : CreatePayTransactionAppRequest.Types.Settlement
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Subsidy : CreatePayTransactionAppRequest.Types.Subsidy
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -135,5 +139,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("settle_info")]
|
[Newtonsoft.Json.JsonProperty("settle_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
||||||
public Types.Settlement? Settlement { get; set; }
|
public Types.Settlement? Settlement { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_info")]
|
||||||
|
public Types.Subsidy? Subsidy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("fqf_exposure")]
|
[Newtonsoft.Json.JsonProperty("fqf_exposure")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("fqf_exposure")]
|
[System.Text.Json.Serialization.JsonPropertyName("fqf_exposure")]
|
||||||
public bool IsExposed { get; set; }
|
public bool IsRecommendExposed { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置曝光凭证。
|
/// 获取或设置曝光凭证。
|
||||||
|
|||||||
@@ -180,6 +180,23 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("goods_detail")]
|
[System.Text.Json.Serialization.JsonPropertyName("goods_detail")]
|
||||||
public Types.GoodsDetail[]? GoodsList { get; set; }
|
public Types.GoodsDetail[]? GoodsList { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Installment
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否使用了商户贴息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("use_subsidy")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("use_subsidy")]
|
||||||
|
public bool IsUseSubsidy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户实际选择的分期期数。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("selected_installment_number")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("selected_installment_number")]
|
||||||
|
public int SelectedInstallmentNumber { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -281,5 +298,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||||
public Types.Promotion[]? PromotionList { get; set; }
|
public Types.Promotion[]? PromotionList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分期信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("installment_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("installment_info")]
|
||||||
|
public Types.Installment? Installment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /pay/instal/partner/exposure 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CreatePayPartnerInstallmentExposureRequest : WechatTenpayRequest
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class User : CreatePayPartnerTransactionExposureRequest.Types.Payer
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户 ID 类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("user_id_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("user_id_type")]
|
||||||
|
public string UserIdType { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信商户号。如果不指定将使用构造 <see cref="WechatTenpayClient"/> 时的 <see cref="WechatTenpayClientOptions.MerchantId"/> 参数。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sp_mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
|
||||||
|
public string? MerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||||
|
public string? SubMerchantId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信 AppId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sp_appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sp_appid")]
|
||||||
|
public string AppId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户 AppId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sub_appid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
|
||||||
|
public string? SubAppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置用户信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("user_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("user_id")]
|
||||||
|
public Types.User User { get; set; } = new Types.User();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /pay/instal/partner/exposure 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CreatePayPartnerInstallmentExposureResponse : CreatePayInstallmentExposureResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,6 +24,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
public class Settlement : CreatePayTransactionAppRequest.Types.Settlement
|
public class Settlement : CreatePayTransactionAppRequest.Types.Settlement
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Subsidy : CreatePayTransactionAppRequest.Types.Subsidy
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -132,5 +136,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("settle_info")]
|
[Newtonsoft.Json.JsonProperty("settle_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
||||||
public Types.Settlement? Settlement { get; set; }
|
public Types.Settlement? Settlement { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_info")]
|
||||||
|
public Types.Subsidy? Subsidy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
public class Settlement : CreatePayTransactionJsapiRequest.Types.Settlement
|
public class Settlement : CreatePayTransactionJsapiRequest.Types.Settlement
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Subsidy : CreatePayTransactionJsapiRequest.Types.Subsidy
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -156,5 +160,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("settle_info")]
|
[Newtonsoft.Json.JsonProperty("settle_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("settle_info")]
|
||||||
public Types.Settlement? Settlement { get; set; }
|
public Types.Settlement? Settlement { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置贴息信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subsidy_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subsidy_info")]
|
||||||
|
public Types.Subsidy? Subsidy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
public class Promotion : GetPayTransactionByOutTradeNumberResponse.Types.Promotion
|
public class Promotion : GetPayTransactionByOutTradeNumberResponse.Types.Promotion
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class Installment : GetPayTransactionByOutTradeNumberResponse.Types.Installment
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -152,5 +156,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||||
public Types.Promotion[]? PromotionList { get; set; }
|
public Types.Promotion[]? PromotionList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分期信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("installment_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("installment_info")]
|
||||||
|
public Types.Installment? Installment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"mchid": "12345",
|
||||||
|
"appid": "123abc",
|
||||||
|
"user_id_type": "OPENID",
|
||||||
|
"openid": "123456789",
|
||||||
|
"phone_number_hash": "EF879546FFFF"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"recommend_exposure": true
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"mchid": "1900006XXX",
|
"mchid": "1900006XXX",
|
||||||
"out_trade_no": "APP1217752501201407033233368018",
|
"out_trade_no": "APP1217752501201407033233368018",
|
||||||
"appid": "wxb4ba3c02aa476XXX",
|
"appid": "wxb4ba3c02aa476XXX",
|
||||||
@@ -7,5 +7,22 @@
|
|||||||
"amount": {
|
"amount": {
|
||||||
"total": 1,
|
"total": 1,
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
|
},
|
||||||
|
"subsidy_info": {
|
||||||
|
"subsidy_detail": [
|
||||||
|
{
|
||||||
|
"subsidy_period_type": "PERIOD",
|
||||||
|
"subsidy_plan": [
|
||||||
|
{
|
||||||
|
"subsidy_installment_num": 3,
|
||||||
|
"subsidy_percent": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"subsidy_installment_num": 6,
|
||||||
|
"subsidy_percent": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"mchid": "1900006XXX",
|
"mchid": "1900006XXX",
|
||||||
"out_trade_no": "1217752501201407033233368318",
|
"out_trade_no": "1217752501201407033233368318",
|
||||||
"appid": "wxdace645e0bc2cXXX",
|
"appid": "wxdace645e0bc2cXXX",
|
||||||
@@ -10,5 +10,22 @@
|
|||||||
},
|
},
|
||||||
"payer": {
|
"payer": {
|
||||||
"openid": "o4GgauInH_RCEdvrrNGrntXDuXXX"
|
"openid": "o4GgauInH_RCEdvrrNGrntXDuXXX"
|
||||||
|
},
|
||||||
|
"subsidy_info": {
|
||||||
|
"subsidy_detail": [
|
||||||
|
{
|
||||||
|
"subsidy_period_type": "PERIOD",
|
||||||
|
"subsidy_plan": [
|
||||||
|
{
|
||||||
|
"subsidy_installment_num": 3,
|
||||||
|
"subsidy_percent": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"subsidy_installment_num": 6,
|
||||||
|
"subsidy_percent": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"sp_mchid": "12345",
|
||||||
|
"sp_appid": "123abc",
|
||||||
|
"sub_mchid": "12345",
|
||||||
|
"sub_appid": "123abc",
|
||||||
|
"user_id": {
|
||||||
|
"user_id_type": "SP_OPENID",
|
||||||
|
"sp_openid": "123456789",
|
||||||
|
"sub_openid": "123456789",
|
||||||
|
"phone_number_hash": "EF879546FFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"recommend_exposure": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user