mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 18:48:10 +08:00
feat(tenpayv3): 新增平台收付通银行转账充值相关接口
This commit is contained in:
@@ -1002,6 +1002,10 @@
|
|||||||
|
|
||||||
- 关闭充值:`ClosePlatformSolutionEcommerceRecharge`
|
- 关闭充值:`ClosePlatformSolutionEcommerceRecharge`
|
||||||
|
|
||||||
|
- 申请银行转账充值:`ApplyPlatformSolutionEcommerceBankTransferRecharge`
|
||||||
|
|
||||||
|
- 查询银行转账充值结果:`GetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumber`
|
||||||
|
|
||||||
- 平台收付通(赔付)
|
- 平台收付通(赔付)
|
||||||
|
|
||||||
- 开通保险理赔功能:`ApplyPlatformSolutionEcommerceInsuranceCompensationContract`
|
- 开通保险理赔功能:`ApplyPlatformSolutionEcommerceInsuranceCompensationContract`
|
||||||
|
@@ -123,6 +123,51 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
|
|
||||||
return await client.SendFlurlRequestAsJsonAsync<Models.ClosePlatformSolutionEcommerceRechargeResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
return await client.SendFlurlRequestAsJsonAsync<Models.ClosePlatformSolutionEcommerceRechargeResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /platsolution/ecommerce/bank-transfer-recharges/apply 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/platsolution-mch-recharge/bank-recharge/bank-transfer-recharge-apply.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ApplyPlatformSolutionEcommerceBankTransferRechargeResponse> ExecuteApplyPlatformSolutionEcommerceBankTransferRechargeAsync(this WechatTenpayClient client, Models.ApplyPlatformSolutionEcommerceBankTransferRechargeRequest 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", "bank-transfer-recharges", "apply");
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.ApplyPlatformSolutionEcommerceBankTransferRechargeResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [GET] /platsolution/ecommerce/bank-transfer-recharges/out-recharge-no/{out_recharge_no} 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/platsolution-mch-recharge/bank-recharge/bank-transfer-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.GetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumberResponse> ExecuteGetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumberAsync(this WechatTenpayClient client, Models.GetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumberRequest 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", "bank-transfer-recharges", "out-recharge-no", request.OutRechargeNumber);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.GetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region MerchantTransfer
|
#region MerchantTransfer
|
||||||
|
@@ -0,0 +1,43 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /platsolution/ecommerce/bank-transfer-recharges/apply 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ApplyPlatformSolutionEcommerceBankTransferRechargeRequest : WechatTenpayRequest
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class RechargeAmount : ApplyPlatformSolutionEcommerceRechargeRequest.Types.RechargeAmount
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,70 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /platsolution/ecommerce/bank-transfer-recharges/apply 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ApplyPlatformSolutionEcommerceBankTransferRechargeResponse : WechatTenpayResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class TransferInAccount
|
||||||
|
{
|
||||||
|
/// <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_address_code")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("bank_address_code")]
|
||||||
|
public string? BankAddressCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置开户银行行号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("bank_code")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("bank_code")]
|
||||||
|
public string? BankCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置银行账户名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("bank_account_name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("bank_account_name")]
|
||||||
|
public string? BankAccountName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置银行账号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("bank_account_no")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("bank_account_no")]
|
||||||
|
public string? BankAccountNumber { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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("transfer_in_account")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("transfer_in_account")]
|
||||||
|
public Types.TransferInAccount TransferInAccount { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,15 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /platsolution/ecommerce/bank-transfer-recharges/out-recharge-no/{out_recharge_no} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumberRequest : WechatTenpayRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户充值单号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
public string OutRechargeNumber { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,111 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /platsolution/ecommerce/bank-transfer-recharges/out-recharge-no/{out_recharge_no} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetPlatformSolutionEcommerceBankTransferRechargeByOutRechargeNumberResponse : WechatTenpayResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class RechargeAmount : GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse.Types.RechargeAmount
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BankTransferInfo : GetPlatformSolutionEcommerceRechargeByOutRechargeNumberResponse.Types.BankTransferInfo
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||||
|
public string MerchantId { 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_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("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,9 @@
|
|||||||
|
{
|
||||||
|
"account_type": "BASIC",
|
||||||
|
"out_recharge_no": "cz202407181234",
|
||||||
|
"recharge_amount": {
|
||||||
|
"amount": 500000,
|
||||||
|
"currency": "CNY"
|
||||||
|
},
|
||||||
|
"recharge_scene": "ECOMMERCE_BANK_TRANSFER"
|
||||||
|
}
|
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"out_recharge_no": "cz202407181234",
|
||||||
|
"recharge_id": "172207846292553701",
|
||||||
|
"transfer_in_account": {
|
||||||
|
"bank_account_name": "某某某有限公司",
|
||||||
|
"bank_account_no": "686000172489957748585801",
|
||||||
|
"bank_address_code": "440300",
|
||||||
|
"bank_code": "991584000049",
|
||||||
|
"bank_name": "财付通-备付金账户"
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"accept_time": "2015-05-20T13:29:35+08:00",
|
||||||
|
"account_type": "BASIC",
|
||||||
|
"bank_transfer_info": {
|
||||||
|
"bank_card_tail": "0722",
|
||||||
|
"bank_name": "中国银行",
|
||||||
|
"memo": "转账充值附言",
|
||||||
|
"return_reason": "银行转账充值金额与申请充值金额不一致",
|
||||||
|
"return_time": "2015-05-20T13:29:35+08:00"
|
||||||
|
},
|
||||||
|
"close_time": "2015-05-20T13:29:35+08:00",
|
||||||
|
"mchid": "1900001121",
|
||||||
|
"out_recharge_no": "cz2020042013",
|
||||||
|
"recharge_amount": {
|
||||||
|
"amount": 500000,
|
||||||
|
"currency": "CNY"
|
||||||
|
},
|
||||||
|
"recharge_id": "172234484162395401",
|
||||||
|
"recharge_scene": "ECOMMERCE_BANK_TRANSFER",
|
||||||
|
"recharge_state": "SUCCESS",
|
||||||
|
"recharge_state_desc": "超过时间限制,系统自动关闭充值单",
|
||||||
|
"success_time": "2015-05-20T13:29:35+08:00"
|
||||||
|
}
|
Reference in New Issue
Block a user