mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-11 10:16:20 +08:00
feat(tenpayv3): 新增教育续费通相关接口
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
| √ | 其他能力:图片上传 | 直连商户 & 服务商 | |
|
||||
| √ | 其他能力:视频上传 | 直连商户 & 服务商 | |
|
||||
| √ | 其他能力:优惠费率活动 | 服务商 | |
|
||||
| √ | 其他能力:校园续费通 | 直连商户 | |
|
||||
| √ | 境外支付:子商户进件 | 服务商 | |
|
||||
| √ | 境外支付:融合钱包 | 服务商 | |
|
||||
| √ | 境外支付:委托代扣 | 直连商户 & 服务商 | |
|
||||
@@ -504,6 +505,24 @@
|
||||
|
||||
- 查询支行列表:`QueryCapitalBanksBranches`
|
||||
|
||||
- 校园续费通:
|
||||
|
||||
- 预签约:`PresignEducationPAPPayContract`
|
||||
|
||||
- 通过协议号查询签约:`GetEducationPAPPayContractByContractId`
|
||||
|
||||
- 通过用户标识查询签约:`QueryEducationPAPPayUserContracts`
|
||||
|
||||
- 解约:`TerminateEducationPAPPayContract`
|
||||
|
||||
- 发送扣款预通知:`SendEducationPAPPayContractNotification`
|
||||
|
||||
- 教育通扣款受理:`CreateEducationPAPPayTransaction`
|
||||
|
||||
- 微信订单号查单:`GetEducationPAPPayTransactionById`
|
||||
|
||||
- 商户订单号查单:`GetEducationPAPPayTransactionByOutTradeNumber`
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示教育续费通 ENTRUST.SIGNING 通知的数据。</para>
|
||||
/// <para>表示教育续费通 ENTRUST.RELEASE 通知的数据。</para>
|
||||
/// </summary>
|
||||
public class EducationEntrustResource : WechatTenpayEvent.Types.IDecryptedResource
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Contract : Models.GetEducationPAPPayContractByContractIdResponse.Types.Contract
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("plan_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("plan_id")]
|
||||
public string PlanId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contract_information")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contract_information")]
|
||||
public Types.Contract Contract { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示教育续费通 TRANSACTION.SUCCESS 通知的数据。</para>
|
||||
/// <para>表示教育续费通 TRANSACTION.FAIL 通知的数据。</para>
|
||||
/// </summary>
|
||||
public class EducationTransactionResource : WechatTenpayEvent.Types.IDecryptedResource
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Payer : Models.GetEducationPAPPayTransactionByOutTradeNumberResponse.Types.Payer
|
||||
{
|
||||
}
|
||||
|
||||
public class Amount : Models.GetEducationPAPPayTransactionByOutTradeNumberResponse.Types.Amount
|
||||
{
|
||||
}
|
||||
|
||||
public class Device : Models.GetEducationPAPPayTransactionByOutTradeNumberResponse.Types.Device
|
||||
{
|
||||
}
|
||||
|
||||
public class Promotion : Models.GetEducationPAPPayTransactionByOutTradeNumberResponse.Types.Promotion
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
||||
public string OutTradeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
public string? TransactionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_state")]
|
||||
public string TradeState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易状态描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_state_description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_state_description")]
|
||||
public string TradeStateDescription { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款银行类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_type")]
|
||||
public string? BankType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attach")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attach")]
|
||||
public string? Attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付完成时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("success_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? SuccessTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付者信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("payer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("payer")]
|
||||
public Types.Payer? Payer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public Types.Amount Amount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_information")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_information")]
|
||||
public Types.Device? Device { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||
public Types.Promotion[]? PromotionList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 TRANSACTION.SUCCESS(仅限 ETC 扣费)通知的数据。</para>
|
||||
/// <para>表示 ETC 扣费 TRANSACTION.SUCCESS 通知的数据。</para>
|
||||
/// </summary>
|
||||
public class VehicleETCTransactionResource : WechatTenpayEvent.Types.IDecryptedResource
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@ using System;
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 TRANSACTION.SUCCESS(仅限微信支付分停车服务)通知的数据。</para>
|
||||
/// <para>表示 TRANSACTION.FAIL(仅限微信支付分停车服务)通知的数据。</para>
|
||||
/// <para>表示 TRANSACTION.PAY_BACK(仅限微信支付分停车服务)通知的数据。</para>
|
||||
/// <para>表示微信支付分停车服务 TRANSACTION.SUCCESS 通知的数据。</para>
|
||||
/// <para>表示微信支付分停车服务 TRANSACTION.FAIL 通知的数据。</para>
|
||||
/// <para>表示微信支付分停车服务 TRANSACTION.PAY_BACK 通知的数据。</para>
|
||||
/// </summary>
|
||||
public class VehicleTransactionResource : WechatTenpayEvent.Types.IDecryptedResource
|
||||
{
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
{
|
||||
public static class WechatTenpayClientExecuteEducationPAPPayExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /edu-papay/contracts/presign 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_1.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.PresignEducationPAPPayContractResponse> ExecutePresignEducationPAPPayContractAsync(this WechatTenpayClient client, Models.PresignEducationPAPPayContractRequest 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, "edu-papay", "contracts", "presign");
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.PresignEducationPAPPayContractResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /edu-papay/contracts/id/{contract_id} 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_2.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.GetEducationPAPPayContractByContractIdResponse> ExecuteGetEducationPAPPayContractByContractIdAsync(this WechatTenpayClient client, Models.GetEducationPAPPayContractByContractIdRequest 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.Get, "edu-papay", "contracts", "id", request.ContractId)
|
||||
.SetQueryParam("appid", request.AppId);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.GetEducationPAPPayContractByContractIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /edu-papay/user/{openid}/contracts 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_3.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.QueryEducationPAPPayUserContractsResponse> ExecuteQueryEducationPAPPayUserContractsAsync(this WechatTenpayClient client, Models.QueryEducationPAPPayUserContractsRequest 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.Get, "edu-papay", "user", request.OpenId, "contracts")
|
||||
.SetQueryParam("appid", request.AppId)
|
||||
.SetQueryParam("plan_id", request.PlanId);
|
||||
|
||||
if (request.ContractStatus != null)
|
||||
flurlReq.SetQueryParam("contract_status", request.ContractStatus);
|
||||
|
||||
if (request.Limit != null)
|
||||
flurlReq.SetQueryParam("limit", request.Limit.Value);
|
||||
|
||||
if (request.Offset != null)
|
||||
flurlReq.SetQueryParam("offset", request.Offset.Value);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.QueryEducationPAPPayUserContractsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [DELETE] /edu-papay/contracts/{contract_id} 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_4.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TerminateEducationPAPPayContractResponse> ExecuteTerminateEducationPAPPayContractAsync(this WechatTenpayClient client, Models.TerminateEducationPAPPayContractRequest 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.Delete, "edu-papay", "contracts", request.ContractId);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TerminateEducationPAPPayContractResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /edu-papay/user-notifications/{contract_id}/send 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_6.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.SendEducationPAPPayContractNotificationResponse> ExecuteSendEducationPAPPayContractNotificationAsync(this WechatTenpayClient client, Models.SendEducationPAPPayContractNotificationRequest 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, "edu-papay", "user-notifications", request.ContractId, "send");
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.SendEducationPAPPayContractNotificationResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /edu-papay/transactions 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_7.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CreateEducationPAPPayTransactionResponse> ExecuteCreateEducationPAPPayTransactionAsync(this WechatTenpayClient client, Models.CreateEducationPAPPayTransactionRequest 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, "edu-papay", "transactions");
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CreateEducationPAPPayTransactionResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /edu-papay/transactions/out-trade-no/{out_trade_no} 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_9.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.GetEducationPAPPayTransactionByOutTradeNumberResponse> ExecuteGetEducationPAPPayTransactionByOutTradeNumberAsync(this WechatTenpayClient client, Models.GetEducationPAPPayTransactionByOutTradeNumberRequest 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.Get, "edu-papay", "transactions", "out-trade-no", request.OutTradeNumber);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.GetEducationPAPPayTransactionByOutTradeNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /edu-papay/transactions/id/{transaction_id} 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3/Offline/apis/chapter5_2_8.shtml </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.GetEducationPAPPayTransactionByIdResponse> ExecuteGetEducationPAPPayTransactionByIdAsync(this WechatTenpayClient client, Models.GetEducationPAPPayTransactionByIdRequest 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.Get, "edu-papay", "transactions", "id", request.TransactionId);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.GetEducationPAPPayTransactionByIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /edu-papay/transactions 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CreateEducationPAPPayTransactionRequest : WechatTenpayRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Amount : CreatePayTransactionAppRequest.Types.Amount
|
||||
{
|
||||
}
|
||||
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户端设备号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
||||
public string? DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户端设备 IP。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_ip")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_ip")]
|
||||
public string? DeviceIp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contract_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contract_id")]
|
||||
public string ContractId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
||||
public string OutTradeNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("body")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("body")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attach")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attach")]
|
||||
public string? Attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回调通知地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("notify_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]
|
||||
public string? NotifyUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单优惠标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("goods_tag")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("goods_tag")]
|
||||
public string? GoodsTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场景值。
|
||||
/// <para>默认值:EDUCATION_PERIOD</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
||||
public string TradeScene { get; set; } = "EDUCATION_PERIOD";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public Types.Amount Amount { get; set; } = new Types.Amount();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_information")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_information")]
|
||||
public Types.Device? Device { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /edu-papay/transactions 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CreateEducationPAPPayTransactionResponse : WechatTenpayResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/contracts/id/{contract_id} 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class GetEducationPAPPayContractByContractIdRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string ContractId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/contracts/id/{contract_id} 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class GetEducationPAPPayContractByContractIdResponse : WechatTenpayResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Contract
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contract_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contract_id")]
|
||||
public string ContractId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contract_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contract_status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("plan_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("plan_id")]
|
||||
public string PlanId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contract_information")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contract_information")]
|
||||
public Types.Contract Contract { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/transactions/id/{transaction_id} 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class GetEducationPAPPayTransactionByIdRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string TransactionId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/transactions/id/{transaction_id} 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class GetEducationPAPPayTransactionByIdResponse : GetEducationPAPPayTransactionByOutTradeNumberResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/transactions/out-trade-no/{out_trade_no} 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class GetEducationPAPPayTransactionByOutTradeNumberRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OutTradeNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/transactions/out-trade-no/{out_trade_no} 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class GetEducationPAPPayTransactionByOutTradeNumberResponse : WechatTenpayResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Payer : GetPayTransactionByOutTradeNumberResponse.Types.Payer
|
||||
{
|
||||
}
|
||||
|
||||
public class Amount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置总金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total")]
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置币种。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
public string? Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户支付金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("payer_total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("payer_total")]
|
||||
public int? PayerTotal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置折扣金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discount_total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discount_total")]
|
||||
public int? DiscountTotal { get; set; }
|
||||
}
|
||||
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户端设备号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
||||
public string? DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户端设备 IP。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_ip")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_ip")]
|
||||
public string? DeviceIp { get; set; }
|
||||
}
|
||||
|
||||
public class Promotion
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置券 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("coupon_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("coupon_id")]
|
||||
public string CouponId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠范围。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("scope")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("scope")]
|
||||
public string Scope { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public string Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券面额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置活动 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stock_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stock_id")]
|
||||
public string? StockId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信出资(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wechatpay_contribute")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wechatpay_contribute")]
|
||||
public int? WechatpayContribute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户出资(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_contribute")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_contribute")]
|
||||
public int? MerchantContribute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置其他出资(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("other_contribute")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("other_contribute")]
|
||||
public int? OtherContribute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠币种。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
public string? Currency { 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("out_trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_trade_no")]
|
||||
public string OutTradeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
public string? TransactionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_state")]
|
||||
public string TradeState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置交易状态描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_state_description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_state_description")]
|
||||
public string TradeStateDescription { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款银行类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_type")]
|
||||
public string? BankType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附加数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attach")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attach")]
|
||||
public string? Attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付完成时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("success_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? SuccessTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付者信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("payer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("payer")]
|
||||
public Types.Payer? Payer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public Types.Amount Amount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_information")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_information")]
|
||||
public Types.Device? Device { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotion_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotion_detail")]
|
||||
public Types.Promotion[]? PromotionList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /edu-papay/contracts/presign 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class PresignEducationPAPPayContractRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <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("plan_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("plan_id")]
|
||||
public string PlanId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户用户账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_id")]
|
||||
public string UserDisplayName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置首次扣款日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("period_start_date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("period_start_date")]
|
||||
public string PeriodStartDateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场景值。
|
||||
/// <para>默认值:EDUCATION_PERIOD</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_scene")]
|
||||
public string TradeScene { get; set; } = "EDUCATION_PERIOD";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /edu-papay/contracts/presign 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class PresignEducationPAPPayContractResponse : WechatTenpayResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置预签约号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("presign_token")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("presign_token")]
|
||||
public string PresignToken { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/user/{openid}/contracts 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class QueryEducationPAPPayUserContractsRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string PlanId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? ContractStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页开始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Offset { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /edu-papay/user/{openid}/contracts 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class QueryEducationPAPPayUserContractsResponse : WechatTenpayResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UserContract
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Contract : GetEducationPAPPayContractByContractIdResponse.Types.Contract
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("plan_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("plan_id")]
|
||||
public string PlanId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contract_information")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contract_information")]
|
||||
public Types.Contract Contract { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.UserContract[] UserContractList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页开始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("offset")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("offset")]
|
||||
public int Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置数据总条数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_count")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /edu-papay/user-notifications/{contract_id}/send 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class SendEducationPAPPayContractNotificationRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string ContractId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /edu-papay/user-notifications/{contract_id}/send 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class SendEducationPAPPayContractNotificationResponse : WechatTenpayResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [DELETE] /edu-papay/contracts/{contract_id} 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TerminateEducationPAPPayContractRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置签约协议号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string ContractId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [DELETE] /edu-papay/contracts/{contract_id} 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TerminateEducationPAPPayContractResponse : WechatTenpayResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
<PackageProjectUrl>https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat</PackageProjectUrl>
|
||||
<PackageTags>Flurl.Http Wechat Weixin MicroMessage Tenpay WechatPay WeixinPay Wxpay 微信 微信支付 微信商户</PackageTags>
|
||||
<Version>2.18.0</Version>
|
||||
<Description>基于 Flurl.Http 的微信支付 API v3 版客户端,支持直连商户、服务商模式,支持基础支付、代金券、商家券、委托营销、消费卡、支付有礼、银行定向促活、微信支付分、微信先享卡、支付即服务、点金计划、智慧商圈、电商收付通、二级商户进件、小微商户进件、消费者投诉、商户违规通知、批量转账到零钱、银行组件、海关报关、融合钱包、微工卡、电子发票、车主平台等功能。</Description>
|
||||
<Description>基于 Flurl.Http 的微信支付 API v3 版客户端,支持直连商户、服务商模式,支持基础支付、代金券、商家券、委托营销、消费卡、支付有礼、银行定向促活、微信支付分、微信先享卡、支付即服务、点金计划、智慧商圈、电商收付通、二级商户进件、小微商户进件、消费者投诉、商户违规通知、批量转账到零钱、银行组件、海关报关、融合钱包、微工卡、电子发票、车主平台、教育续费通等功能。</Description>
|
||||
<Authors>Fu Diwei</Authors>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git</RepositoryUrl>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"appid": "wx8888888888888888",
|
||||
"openid": "oUpF8uMuAJOM2pxb1Q",
|
||||
"plan_id": "101164396123311331",
|
||||
"contract_information": {
|
||||
"contract_id": "wx998877665544wx",
|
||||
"contract_status": "ADD",
|
||||
"create_time": "2020-03-26T10:43:39+08:00"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"appid": "wx8888888888888888",
|
||||
"body": "新东方-语文课程",
|
||||
"attach": "自定义数据",
|
||||
"out_trade_no": "121775250124070332",
|
||||
"goods_tag": "test",
|
||||
"notify_url": "https://www.weixin.qq.com/wxpay/pay",
|
||||
"contract_id": "wx998877665544wx",
|
||||
"trade_scene": "EDUCATION_PERIOD",
|
||||
"amount": {
|
||||
"total": 888,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"device_information": {
|
||||
"device_id": "12343232",
|
||||
"device_ip": "123.12.12.123"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"appid": "wx8888888888888888",
|
||||
"openid": "oUpF8uMuAJOM2pxb1Q",
|
||||
"plan_id": "101164396123311331",
|
||||
"contract_information": {
|
||||
"contract_id": "wx998877665544wx",
|
||||
"contract_status": "ADD",
|
||||
"create_time": "2020-03-26T10:43:39+08:00"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"appid": "wx8888888888888888",
|
||||
"out_trade_no": "201407033233368018",
|
||||
"transaction_id": "25012014070332333018",
|
||||
"attach": "自定义数据",
|
||||
"bank_type": "CMC",
|
||||
"success_time": "2020-03-26T10:43:39+08:00",
|
||||
"trade_state": "SUCCESS",
|
||||
"trade_state_description": "支付成功",
|
||||
"payer": {
|
||||
"openid": "oUpF8uMuAJOM2pxb1Q"
|
||||
},
|
||||
"amount": {
|
||||
"total": 888,
|
||||
"payer_total": 888,
|
||||
"discount_total": 100,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"device_information": {
|
||||
"device_id": "12343232",
|
||||
"device_ip": "123.12.12.123"
|
||||
},
|
||||
"promotion_detail": [
|
||||
{
|
||||
"coupon_id": "109519",
|
||||
"name": "单品惠-6",
|
||||
"scope": "GLOBALSINGLE",
|
||||
"type": "DISCOUNTCOUPON",
|
||||
"amount": 5,
|
||||
"stock_id": "931386",
|
||||
"wechatpay_contribute": 0,
|
||||
"merchant_contribute": 0,
|
||||
"other_contribute": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"out_trade_no": "201407033233368018",
|
||||
"transaction_id": "25012014070332333018",
|
||||
"attach": "自定义数据",
|
||||
"bank_type": "CMC",
|
||||
"success_time": "2020-03-26T10:43:39+08:00",
|
||||
"trade_state": "SUCCESS",
|
||||
"trade_state_description": "支付成功",
|
||||
"payer": {
|
||||
"openid": "oUpF8uMuAJOM2pxb1Q"
|
||||
},
|
||||
"amount": {
|
||||
"total": 888,
|
||||
"payer_total": 888,
|
||||
"discount_total": 100,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"device_information": {
|
||||
"device_id": "12343232",
|
||||
"device_ip": "123.12.12.123"
|
||||
},
|
||||
"promotion_detail": [
|
||||
{
|
||||
"coupon_id": "109519",
|
||||
"name": "单品惠-6",
|
||||
"scope": "GLOBALSINGLE",
|
||||
"type": "DISCOUNTCOUPON",
|
||||
"amount": 5,
|
||||
"stock_id": "931386",
|
||||
"wechatpay_contribute": 0,
|
||||
"merchant_contribute": 0,
|
||||
"other_contribute": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"appid": "wx8888888888888888",
|
||||
"openid": "oUpF8uMuAJOM2pxb1Q",
|
||||
"plan_id": "101164396123311331",
|
||||
"user_id": "20200330tony",
|
||||
"period_start_date": "2020-03-19",
|
||||
"trade_scene": "EDUCATION_PERIOD"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presign_token": "0044de6c799739c2e8534b"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"appid": "wx8888888888888888",
|
||||
"openid": "oUpF8uMuAJOM2pxb1Q",
|
||||
"plan_id": "101164396123311331",
|
||||
"contract_information": {
|
||||
"contract_id": "wx998877665544wx",
|
||||
"contract_status": "ADD",
|
||||
"create_time": "2020-03-26T10:43:39+08:00"
|
||||
}
|
||||
}
|
||||
],
|
||||
"total_count": 30,
|
||||
"offset": 0,
|
||||
"limit": 20
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"appid": "wx8888888888888888"
|
||||
}
|
||||
Reference in New Issue
Block a user