feat(tenpayv2): 新增跨境支付相关接口

This commit is contained in:
Fu Diwei
2022-02-24 11:22:40 +08:00
parent 5d56e5a016
commit 99fbb8f7c0
14 changed files with 427 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Events
{
/// <summary>
/// <para>表示退款结果通知的模型。</para>
/// <para>表示交易结果通知的模型。</para>
/// </summary>
[Newtonsoft.Json.JsonConverter(typeof(Converters.EventClassNewtonsoftJsonConverter))]
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.EventClassSystemTextJsonConverter))]
@@ -209,5 +209,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Events
[System.Text.Json.Serialization.JsonPropertyName("time_end")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.PureDigitalTextNullableDateTimeOffsetConverter))]
public DateTimeOffset? EndTime { get; set; }
/// <summary>
/// 获取或设置汇率字符串(格式:外币兑换人民币的比例乘以 10 的 8 次方)。
/// </summary>
[Newtonsoft.Json.JsonProperty("rate")]
[System.Text.Json.Serialization.JsonPropertyName("rate")]
public string? ExchangeRateString { get; set; }
}
}

View File

@@ -20,6 +20,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/app/app_sl.php?chapter=9_1&index=1 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/H5_sl.php?chapter=9_1&index=1 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_sl_api.php?chapter=9_1 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_1.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_1.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_10.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_1.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_10.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -41,6 +46,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_10&index=1 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/micropay_sl.php?chapter=9_10&index=1 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/danpin.php?chapter=9_101&index=1 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter3_3.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -71,6 +77,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/app/app_sl.php?chapter=9_2&index=4 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/H5_sl.php?chapter=9_2&index=2 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_sl_api.php?chapter=9_2 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_2.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_2.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_2.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_2.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_2.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_2.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -90,6 +102,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <summary>
/// <para>异步调用 [POST] /secapi/pay/reverse 接口。</para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/micropay_sl.php?chapter=9_11&index=3 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter3_4.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -120,6 +133,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_sl_api.php?chapter=9_3 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter4_6.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter5_17.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_3.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_3.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_3.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_3.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_3.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -151,6 +169,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter4_3.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter5_13.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2_sl.php?chapter=9_4&index=5&p=202 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_4.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_4.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_4.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_4.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_4.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_4.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -182,6 +206,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter4_4.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter5_14.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2_sl.php?chapter=9_5&index=6&p=202 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_5.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_5.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_5.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_5.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_5.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_5.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -198,6 +228,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
return await client.SendRequestWithXmlAsync<Models.GetPayRefundResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#region Bill
/// <summary>
/// <para>异步调用 [POST] /pay/downloadbill 接口。</para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_6 </para>
@@ -214,6 +245,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter4_1.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay_v2/papay/chapter5_11.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/vehicle_v2_sl.php?chapter=9_6&index=3&p=202 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_6.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_6.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_6.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_6.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_6.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_6.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
@@ -253,5 +290,58 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
return await client.SendRequestWithXmlAsync<Models.DownloadPayFundFlowResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region Settlement
/// <summary>
/// <para>异步调用 [POST] /pay/settlementquery 接口。</para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_9.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_9.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_9.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_9.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_9.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_9.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.GetPaySettlementResponse> ExecuteGetPaySettlementAsync(this WechatTenpayClient client, Models.GetPaySettlementRequest 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, "pay", "settlementquery");
return await client.SendRequestWithXmlAsync<Models.GetPaySettlementResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region ExchangeRate
/// <summary>
/// <para>异步调用 [POST] /pay/queryexchagerate 接口。</para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_10.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_10.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_10.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_10.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_10.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_10.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.GetPayExchangeRateResponse> ExecuteGetPayExchangeRateAsync(this WechatTenpayClient client, Models.GetPayExchangeRateRequest 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, "pay", "queryexchagerate");
return await client.SendRequestWithXmlAsync<Models.GetPayExchangeRateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
}
}

View File

@@ -22,6 +22,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/app/app_sl.php?chapter=9_8&index=10 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/H5_sl.php?chapter=9_8&index=9 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_sl_api.php?chapter=9_8&index=9 </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/QuickPay/chapter8_8.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/NativePay/chapter8_8.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/MiniProgramPay/chapter8_8.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/OfficialPayMent/chapter8_8.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/In-AppPay/chapter8_8.shtml </para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/pay/H5Payment/chapter8_8.shtml </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>

View File

@@ -156,7 +156,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
[Newtonsoft.Json.JsonProperty("count")]
[System.Text.Json.Serialization.JsonPropertyName("count")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int TotalRecordCount { get; set; }
public int RecordCount { get; set; }
/// <summary>
/// 获取或设置验核机构。

View File

@@ -0,0 +1,43 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
{
/// <summary>
/// <para>表示 [POST] /pay/queryexchagerate 接口的请求。</para>
/// </summary>
public class GetPayExchangeRateRequest : WechatTenpaySignableRequest
{
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
public override string? MerchantId { get; set; }
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public override string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置币种。
/// </summary>
[Newtonsoft.Json.JsonProperty("fee_type")]
[System.Text.Json.Serialization.JsonPropertyName("fee_type")]
public string FeeType { get; set; } = string.Empty;
/// <summary>
/// 获取或设置汇率日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date")]
[System.Text.Json.Serialization.JsonPropertyName("date")]
public string DateString { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,50 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
{
/// <summary>
/// <para>表示 [POST] /pay/queryexchagerate 接口的响应。</para>
/// </summary>
public class GetPayExchangeRateResponse : WechatTenpaySignableResponse
{
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
public override string? MerchantId { get; set; }
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public override string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置币种。
/// </summary>
[Newtonsoft.Json.JsonProperty("fee_type")]
[System.Text.Json.Serialization.JsonPropertyName("fee_type")]
public string FeeType { get; set; } = default!;
/// <summary>
/// 获取或设置汇率日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("rate_time")]
[System.Text.Json.Serialization.JsonPropertyName("rate_time")]
public string DateString { get; set; } = default!;
/// <summary>
/// 获取或设置汇率字符串(格式:外币兑换人民币的比例乘以 10 的 8 次方)。
/// </summary>
[Newtonsoft.Json.JsonProperty("rate")]
[System.Text.Json.Serialization.JsonPropertyName("rate")]
public string ExchangeRateString { get; set; } = default!;
}
}

View File

@@ -0,0 +1,66 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
{
/// <summary>
/// <para>表示 [POST] /pay/settlementquery 接口的请求。</para>
/// </summary>
public class GetPaySettlementRequest : WechatTenpaySignableRequest
{
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
public override string? MerchantId { get; set; }
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public override string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置结算状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("usetag")]
[System.Text.Json.Serialization.JsonPropertyName("usetag")]
public int SettlementStatus { get; set; }
/// <summary>
/// 获取或设置交易开始日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date_start")]
[System.Text.Json.Serialization.JsonPropertyName("date_start")]
public string StartDateString { get; set; } = string.Empty;
/// <summary>
/// 获取或设置交易结束日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date_end")]
[System.Text.Json.Serialization.JsonPropertyName("date_end")]
public string EndDateString { get; set; } = string.Empty;
/// <summary>
/// 获取或设置分页起始位置。
/// <para>默认值0</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("offset")]
[System.Text.Json.Serialization.JsonPropertyName("offset")]
public int Offset { get; set; } = 0;
/// <summary>
/// 获取或设置分页每页数量。
/// <para>默认值10</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("limit")]
[System.Text.Json.Serialization.JsonPropertyName("limit")]
public int Limit { get; set; } = 10;
}
}

View File

@@ -0,0 +1,114 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
{
/// <summary>
/// <para>表示 [POST] /pay/settlementquery 接口的响应。</para>
/// </summary>
public class GetPaySettlementResponse : WechatTenpaySignableResponse
{
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("mch_id")]
public override string? MerchantId { get; set; }
/// <summary>
/// <inheritdoc/>
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public override string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mch_id")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mch_id")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置记录总数。
/// </summary>
[Newtonsoft.Json.JsonProperty("record_num")]
[System.Text.Json.Serialization.JsonPropertyName("record_num")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int RecordCount { get; set; }
/// <summary>
/// 获取或设置付汇批次号。
/// </summary>
[Newtonsoft.Json.JsonProperty("fbatchno")]
[System.Text.Json.Serialization.JsonPropertyName("fbatchno")]
public string ForeignPaymentBatchNumber { get; set; } = default!;
/// <summary>
/// 获取或设置结算日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date_settlement")]
[System.Text.Json.Serialization.JsonPropertyName("date_settlement")]
public string SettlementDateString { get; set; } = default!;
/// <summary>
/// 获取或设置交易开始日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date_start")]
[System.Text.Json.Serialization.JsonPropertyName("date_start")]
public string StartDateString { get; set; } = default!;
/// <summary>
/// 获取或设置交易结束日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date_end")]
[System.Text.Json.Serialization.JsonPropertyName("date_end")]
public string EndDateString { get; set; } = default!;
/// <summary>
/// 获取或设置已划账金额(单位:指定货币的最小单位)。
/// </summary>
[Newtonsoft.Json.JsonProperty("settlement_fee")]
[System.Text.Json.Serialization.JsonPropertyName("settlement_fee")]
public int SettlementFee { get; set; }
/// <summary>
/// 获取或设置未划账金额(单位:指定货币的最小单位)。
/// </summary>
[Newtonsoft.Json.JsonProperty("unsettlement_fee")]
[System.Text.Json.Serialization.JsonPropertyName("unsettlement_fee")]
public int UnsettlementFee { get; set; }
/// <summary>
/// 获取或设置交易币种。
/// </summary>
[Newtonsoft.Json.JsonProperty("settlementfee_type")]
[System.Text.Json.Serialization.JsonPropertyName("settlementfee_type")]
public string SettlementFeeType { get; set; } = default!;
/// <summary>
/// 获取或设置该结算周期内会发生结算的交易总金额(单位:指定货币的最小单位)。
/// </summary>
[Newtonsoft.Json.JsonProperty("pay_fee")]
[System.Text.Json.Serialization.JsonPropertyName("pay_fee")]
public int PaymentFee { get; set; }
/// <summary>
/// 获取或设置该结算周期内退款总金额(单位:指定货币的最小单位)。
/// </summary>
[Newtonsoft.Json.JsonProperty("refund_fee")]
[System.Text.Json.Serialization.JsonPropertyName("refund_fee")]
public int RefundFee { get; set; }
/// <summary>
/// 获取或设置该结算周期交易与退款总金额之差(单位:指定货币的最小单位)。
/// </summary>
[Newtonsoft.Json.JsonProperty("pay_net_fee")]
[System.Text.Json.Serialization.JsonPropertyName("pay_net_fee")]
public int PaymentNetFee { get; set; }
/// <summary>
/// 获取或设置手续费金额(单位:指定货币的最小单位)。
/// </summary>
[Newtonsoft.Json.JsonProperty("poundage_fee")]
[System.Text.Json.Serialization.JsonPropertyName("poundage_fee")]
public int PoundageFee { get; set; }
}
}

View File

@@ -111,7 +111,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.Models
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int TotalCount { get; set; } = 1;
public int TotalCount { get; set; }
/// <summary>
/// 获取或设置红包祝福语。