mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-18 17:48:12 +08:00
feat(wxapi): 新增小程序支付管理服务订单相关接口
This commit is contained in:
@@ -1446,6 +1446,88 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Pay
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/pay/createorder 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/API/order/create_order.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopPayCreateOrderResponse> ExecuteShopPayCreateOrderAsync(this WechatApiClient client, Models.ShopPayCreateOrderRequest 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, "shop", "pay", "createorder")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopPayCreateOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/pay/closeorder 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/API/order/close_order.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopPayCloseOrderResponse> ExecuteShopPayCloseOrderAsync(this WechatApiClient client, Models.ShopPayCloseOrderRequest 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, "shop", "pay", "closeorder")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopPayCloseOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/pay/getorderlist 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/API/order/get_order_detail.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopPayGetOrderListResponse> ExecuteShopPayGetOrderListAsync(this WechatApiClient client, Models.ShopPayGetOrderListRequest 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, "shop", "pay", "getorderlist")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopPayGetOrderListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/pay/getorder 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/wxafunds/API/order/get_order_detail.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ShopPayGetOrderResponse> ExecuteShopPayGetOrderAsync(this WechatApiClient client, Models.ShopPayGetOrderRequest 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, "shop", "pay", "getorder")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ShopPayGetOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Funds
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /shop/funds/scanorderflow 接口。</para>
|
||||
|
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/closeorder 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopPayCloseOrderRequest : WechatApiRequest, IInferable<ShopPayCloseOrderRequest, ShopPayCloseOrderResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SubOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string MerchantId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_no")]
|
||||
public string OutTradeNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置合单商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("combine_trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("combine_trade_no")]
|
||||
public string CombineOutTradeNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子订单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_orders")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_orders")]
|
||||
public IList<Types.SubOrder> SubOrderList { get; set; } = new List<Types.SubOrder>();
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/closeorder 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopPayCloseOrderResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/createorder 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopPayCreateOrderRequest : WechatApiRequest, IInferable<ShopPayCreateOrderRequest, ShopPayCreateOrderResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SubOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string MerchantId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_no")]
|
||||
public string OutTradeNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置合单商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("combine_trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("combine_trade_no")]
|
||||
public string CombineOutTradeNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单过期时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("expire_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expire_time")]
|
||||
public long? ExpireTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子订单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_orders")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_orders")]
|
||||
public IList<Types.SubOrder> SubOrderList { get; set; } = new List<Types.SubOrder>();
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/createorder 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopPayCreateOrderResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class PaymentParameters : ShopOrderGetPaymentParametersResponse.Types.PaymentParameters
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("payment_params")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("payment_params")]
|
||||
public Types.PaymentParameters PaymentParameters { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/getorderlist 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopPayGetOrderListRequest : WechatApiRequest, IInferable<ShopPayGetOrderListRequest, ShopPayGetOrderListResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_index")]
|
||||
public string? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string? MerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置起始创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("begin_create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("begin_create_time")]
|
||||
public long? StartCreateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置截止创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_create_time")]
|
||||
public long? EndCreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/getorderlist 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopPayGetOrderListResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_no_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_no_list")]
|
||||
public string[] OutTradeNumeberList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有下一页。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下一页分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_index")]
|
||||
public string? Offset { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/getorder 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ShopPayGetOrderRequest : WechatApiRequest, IInferable<ShopPayGetOrderRequest, ShopPayGetOrderResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_no")]
|
||||
public string OutTradeNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,221 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /shop/pay/getorder 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ShopPayGetOrderResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Refund
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户退款单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refund_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refund_no")]
|
||||
public string OutRefundNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付退款单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refund_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refund_id")]
|
||||
public string? RefundId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置完成时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_time")]
|
||||
public long? FinishTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款结果。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public string Result { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class ProfitSharing
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户分账单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("profit_sharing_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing_no")]
|
||||
public string OutProfitSharingNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信分账单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("profit_sharing_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing_id")]
|
||||
public string ProfitSharingId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分账金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置完成时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_time")]
|
||||
public long? FinishTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分账结果。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public string Result { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trade_no")]
|
||||
public string OutTradeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置合单商户订单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("combine_trade_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("combine_trade_no")]
|
||||
public string CombineOutTradeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付交易单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
public string? TransactionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time")]
|
||||
public long? PayTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过期时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("expire_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expire_time")]
|
||||
public long? ExpireTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("description")]
|
||||
public string Description { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refund_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refund_list")]
|
||||
public Types.Refund[]? RefundList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分账列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("profit_sharing_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing_list")]
|
||||
public Types.ProfitSharing[]? ProfitSharingList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置账期(单位:天)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("profit_sharing_delay")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing_delay")]
|
||||
public int? ProfitSharingDelay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否被冻结分账。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("profit_sharing_frozen")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("profit_sharing_frozen")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
|
||||
public bool? IsProfitSharingFrozen { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order")]
|
||||
public Types.Order Order { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"openid": "oTVP50O53a7jgmawAmxKukNlq3XI",
|
||||
"combine_trade_no": "P20150806125346",
|
||||
"sub_orders": [
|
||||
{
|
||||
"mchid": "1900000109",
|
||||
"trade_no": "20150806125346"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"openid": "oTVP50O53a7jgmawAmxKukNlq3XI",
|
||||
"combine_trade_no": "P20150806125346",
|
||||
"expire_time": 1647360558,
|
||||
"sub_orders": [
|
||||
{
|
||||
"mchid": "1230000109",
|
||||
"amount": 100,
|
||||
"trade_no": "20150806125346",
|
||||
"description": "Image形象店 - 深圳腾大 -QQ 公仔"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"payment_params": {
|
||||
"timeStamp": 1639124652,
|
||||
"nonceStr": "123",
|
||||
"package": "prepay_id=123",
|
||||
"paySign": "12904324823458940394",
|
||||
"signType": "MD5"
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"begin_create_time": 1648137600,
|
||||
"end_create_time": 1648173600,
|
||||
"last_index": "12345",
|
||||
"page_size": 10,
|
||||
"mchid": "1230000109"
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"has_more": true,
|
||||
"last_index": "12345",
|
||||
"trade_no_list": ["12345"]
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"trade_no": "123455"
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"order": {
|
||||
"trade_no": "522346",
|
||||
"transaction_id": "4302900974202204024351451925",
|
||||
"combine_trade_no": "512346",
|
||||
"mchid": "1623426221",
|
||||
"create_time": 1648880172,
|
||||
"update_time": 1648880485,
|
||||
"pay_time": 1648880315,
|
||||
"expire_time": 1651161600,
|
||||
"amount": 1,
|
||||
"description": "测试商品",
|
||||
"refund_list": [
|
||||
{
|
||||
"amount": 1,
|
||||
"create_time": 1648880476,
|
||||
"finish_time": 1648880483,
|
||||
"result": "SUCCESS",
|
||||
"refund_id": "50301901362022040218937476250",
|
||||
"refund_no": "522347"
|
||||
}
|
||||
],
|
||||
"profit_sharing_list": [
|
||||
{
|
||||
"mchid": "1623426221",
|
||||
"amount": 1,
|
||||
"create_time": 1648880985,
|
||||
"finish_time": 1648881016,
|
||||
"result": "SUCCESS",
|
||||
"profit_sharing_id": "30002107912022040228952584675",
|
||||
"profit_sharing_no": "512341"
|
||||
}
|
||||
],
|
||||
"profit_sharing_delay": 30,
|
||||
"profit_sharing_frozen": 0
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user