mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-18 04:33:16 +08:00
feat(tenpayv3): 新增平台收付通商家充值相关接口
This commit is contained in:
parent
d927b2a328
commit
00ca567802
@ -994,6 +994,14 @@
|
||||
|
||||
- 微信支付预约单号查询预约商家转账记录:`GetPlatformSolutionMerchantTransferReservationByReservationId`
|
||||
|
||||
- 平台收付通(商家充值)
|
||||
|
||||
- 申请充值:`ApplyPlatformSolutionEcommerceRecharge`
|
||||
|
||||
- 查询充值结果:`GetPlatformSolutionEcommerceRechargeByOutRechargeNumber`
|
||||
|
||||
- 关闭充值:`ClosePlatformSolutionEcommerceRecharge`
|
||||
|
||||
- 代金券
|
||||
|
||||
- 创建代金券批次:`CreateMarketingFavorStock`
|
||||
|
@ -0,0 +1,148 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 RECHARGE.SUCCESS (仅限服务商)通知的数据。</para>
|
||||
/// <para>表示 RECHARGE.CLOSED (仅限服务商)通知的数据。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/platsolution-mch-recharge/notification/recharge-notice.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public class PlatformSolutionRechargeResource : WechatTenpayEvent.Types.IDecryptedResource
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class RechargeAmount : Models.GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse.Types.RechargeAmount
|
||||
{
|
||||
}
|
||||
|
||||
public class BankTransferInfo : Models.GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse.Types.BankTransferInfo
|
||||
{
|
||||
}
|
||||
|
||||
public class QrRechargeInfo : Models.GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse.Types.QrRechargeInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sp_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string SubMerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_recharge_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_recharge_no")]
|
||||
public string OutRechargeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_id")]
|
||||
public string RechargeId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值渠道。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_channel")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_channel")]
|
||||
public string? RechargeChannel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值场景。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_scene")]
|
||||
public string RechargeScene { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_state")]
|
||||
public string RechargeState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值状态描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_state_desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_state_desc")]
|
||||
public string? RechargeSceneDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值入账账户。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_type")]
|
||||
public string AccountType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_amount")]
|
||||
public Types.RechargeAmount RechargeAmount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置转账充值的付款信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_transfer_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_transfer_info")]
|
||||
public Types.BankTransferInfo? BankTransferInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置扫码充值的付款信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qr_recharge_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qr_recharge_info")]
|
||||
public Types.QrRechargeInfo? QrRechargeInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值受理时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("accept_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("accept_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? AcceptTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值成功时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("success_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? SuccessTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值关闭时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("close_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("close_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? CloseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
@ -8,6 +8,76 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
{
|
||||
public static class WechatTenpayClientExecutePlatformSolutionExtensions
|
||||
{
|
||||
#region EcommerceRecharges
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /platsolution/ecommerce/recharges/apply 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/platsolution-mch-recharge/recharge/apply.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ApplyPlatformSolutionEcommerceRechargeResponse> ExecuteApplyPlatformSolutionEcommerceRechargeAsync(this WechatTenpayClient client, Models.ApplyPlatformSolutionEcommerceRechargeRequest 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
|
||||
.CreateFlurlRequest(request, HttpMethod.Post, "platsolution", "ecommerce", "recharges", "apply");
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ApplyPlatformSolutionEcommerceRechargeResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no} 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/platsolution-mch-recharge/recharge/get-by-out-no.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse> ExecuteGetPlatformSolutionEcommerceRechargeByOutRechargeNumberAsync(this WechatTenpayClient client, Models.GetPlatformSolutionEcommerceRechargeByOutRechargeNumberRequest 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
|
||||
.CreateFlurlRequest(request, HttpMethod.Get, "platsolution", "ecommerce", "recharges", "out-recharge-no", request.OutRechargeNumber)
|
||||
.SetQueryParam("sub_mchid", request.SubMerchantId);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}/close 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/platsolution-mch-recharge/recharge/close.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ClosePlatformSolutionEcommerceRechargeResponse> ExecuteClosePlatformSolutionEcommerceRechargeAsync(this WechatTenpayClient client, Models.ClosePlatformSolutionEcommerceRechargeRequest 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
|
||||
.CreateFlurlRequest(request, HttpMethod.Post, "platsolution", "ecommerce", "recharges", "out-recharge-no", request.OutRechargeNumber, "close")
|
||||
.SetQueryParam("sub_mchid", request.SubMerchantId);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ClosePlatformSolutionEcommerceRechargeResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region MerchantTransfer
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /platsolution/mch-transfer/batches/apply 接口。</para>
|
||||
|
@ -0,0 +1,70 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /platsolution/ecommerce/recharges/apply 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ApplyPlatformSolutionEcommerceRechargeRequest : WechatTenpayRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class RechargeAmount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int? Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置币种。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
public string? Currency { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string SubMerchantId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_recharge_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_recharge_no")]
|
||||
public string OutRechargeNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值场景。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_scene")]
|
||||
public string RechargeScene { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值入账账户。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_type")]
|
||||
public string AccountType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_amount")]
|
||||
public Types.RechargeAmount RechargeAmount { get; set; } = new Types.RechargeAmount();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回调通知地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("notify_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]
|
||||
public string? NotifyUrl { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /platsolution/ecommerce/recharges/apply 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ApplyPlatformSolutionEcommerceRechargeResponse : WechatTenpayResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_recharge_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_recharge_no")]
|
||||
public string OutRechargeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_id")]
|
||||
public string RechargeId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_url")]
|
||||
public string RechargeUrl { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}/close 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ClosePlatformSolutionEcommerceRechargeRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string SubMerchantId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OutRechargeNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}/close 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ClosePlatformSolutionEcommerceRechargeResponse : GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no} 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class GetPlatformSolutionEcommerceRechargeByOutRechargeNumberRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string SubMerchantId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OutRechargeNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,198 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no} 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse : WechatTenpayResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class RechargeAmount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int? Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置币种。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
public string? Currency { get; set; }
|
||||
}
|
||||
|
||||
public class BankTransferInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置转入的银行流水单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bill_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bill_no")]
|
||||
public string? BillNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置转账充值附言。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("memo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("memo")]
|
||||
public string? Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行转账退回时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("return_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("return_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? ReturnTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行转账退回原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("return_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("return_reason")]
|
||||
public string? ReturnReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开户银行名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_name")]
|
||||
public string? BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行卡号后四位。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_card_tail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_card_tail")]
|
||||
public string? BankCardNumberTail { get; set; }
|
||||
}
|
||||
|
||||
public class QrRechargeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string? OpenId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sp_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string SubMerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_recharge_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_recharge_no")]
|
||||
public string OutRechargeNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信充值单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_id")]
|
||||
public string RechargeId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值渠道。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_channel")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_channel")]
|
||||
public string? RechargeChannel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值场景。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_scene")]
|
||||
public string RechargeScene { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_state")]
|
||||
public string RechargeState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值状态描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_state_desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_state_desc")]
|
||||
public string? RechargeSceneDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值入账账户。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_type")]
|
||||
public string AccountType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("recharge_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("recharge_amount")]
|
||||
public Types.RechargeAmount RechargeAmount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置转账充值的付款信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_transfer_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_transfer_info")]
|
||||
public Types.BankTransferInfo? BankTransferInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置扫码充值的付款信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qr_recharge_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qr_recharge_info")]
|
||||
public Types.QrRechargeInfo? QrRechargeInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值受理时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("accept_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("accept_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? AcceptTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值成功时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("success_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("success_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? SuccessTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置充值关闭时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("close_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("close_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||
public DateTimeOffset? CloseTime { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"sp_mchid": "1900001109",
|
||||
"sub_mchid": "1900001121",
|
||||
"out_recharge_no": "cz202407181234",
|
||||
"recharge_id": "100000202405180012345678",
|
||||
"recharge_scene": "ECOMMERCE_DEPOSIT",
|
||||
"account_type": "DEPOSIT",
|
||||
"recharge_channel": "QR_RECHARGE",
|
||||
"recharge_amount": {
|
||||
"amount": 500000,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"recharge_state": "SUCCESS",
|
||||
"recharge_state_desc": "充值成功",
|
||||
"accept_time": "2015-05-19T13:29:35+08:00",
|
||||
"success_time": "2015-05-20T14:29:35+08:00",
|
||||
"close_time": "2015-05-20T14:29:35+08:00",
|
||||
"remark": "备注",
|
||||
"qr_recharge_info": {
|
||||
"openid": "owYiu0WOJdGCYxoHrPabGhI39uT4"
|
||||
},
|
||||
"bank_transfer_info": {
|
||||
"bill_no": "111111",
|
||||
"memo": "转账充值附言",
|
||||
"bank_name": "中国银行",
|
||||
"bank_card_tail": "0722"
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"sub_mchid": "1900001109",
|
||||
"out_recharge_no": "cz202407181234",
|
||||
"recharge_scene": "ECOMMERCE_DEPOSIT",
|
||||
"account_type": "DEPOSIT",
|
||||
"recharge_amount": {
|
||||
"amount": 500000,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"notify_url": "https://www.weixin.qq.com/wxpay/pay.php"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"recharge_id": "172207846292553701",
|
||||
"out_recharge_no": "cz202407181234",
|
||||
"recharge_url": "https://www.payapp.qq.com/plat/recharge.html"
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"sp_mchid": "1900001109",
|
||||
"sub_mchid": "1900001121",
|
||||
"recharge_id": "172234484162395401",
|
||||
"out_recharge_no": "cz2020042013",
|
||||
"recharge_channel": "BANK_TRANSFER",
|
||||
"account_type": "DEPOSIT",
|
||||
"recharge_state": "SUCCESS",
|
||||
"recharge_scene": "ECOMMERCE_DEPOSIT",
|
||||
"recharge_state_desc": "超过时间限制,系统自动关闭充值单",
|
||||
"recharge_amount": {
|
||||
"amount": 500000,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"bank_transfer_info": {
|
||||
"bill_no": "110240620400046628001252733345",
|
||||
"memo": "转账充值附言",
|
||||
"return_time": "2015-05-20T13:29:35+08:00",
|
||||
"return_reason": "银行转账充值金额与申请充值金额不一致",
|
||||
"bank_name": "中国银行",
|
||||
"bank_card_tail": "0722"
|
||||
},
|
||||
"qr_recharge_info": {
|
||||
"openid": "owYiu0WOJdGCYxoHrPabGhI39uT4"
|
||||
},
|
||||
"accept_time": "2015-05-20T13:29:35+08:00",
|
||||
"success_time": "2015-05-20T13:29:35+08:00",
|
||||
"close_time": "2015-05-20T13:29:35+08:00"
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"sp_mchid": "1900001109",
|
||||
"sub_mchid": "1900001121",
|
||||
"recharge_id": "172234484162395401",
|
||||
"out_recharge_no": "cz2020042013",
|
||||
"recharge_channel": "BANK_TRANSFER",
|
||||
"account_type": "DEPOSIT",
|
||||
"recharge_state": "SUCCESS",
|
||||
"recharge_scene": "ECOMMERCE_DEPOSIT",
|
||||
"recharge_state_desc": "超过时间限制,系统自动关闭充值单",
|
||||
"recharge_amount": {
|
||||
"amount": 500000,
|
||||
"currency": "CNY"
|
||||
},
|
||||
"bank_transfer_info": {
|
||||
"bill_no": "110240620400046628001252733345",
|
||||
"memo": "转账充值附言",
|
||||
"return_time": "2015-05-20T13:29:35+08:00",
|
||||
"return_reason": "银行转账充值金额与申请充值金额不一致",
|
||||
"bank_name": "中国银行",
|
||||
"bank_card_tail": "0722"
|
||||
},
|
||||
"qr_recharge_info": {
|
||||
"openid": "owYiu0WOJdGCYxoHrPabGhI39uT4"
|
||||
},
|
||||
"accept_time": "2015-05-20T13:29:35+08:00",
|
||||
"success_time": "2015-05-20T13:29:35+08:00",
|
||||
"close_time": "2015-05-20T13:29:35+08:00"
|
||||
}
|
Loading…
Reference in New Issue
Block a user