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:
@@ -188,6 +188,72 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.GetFundAppMerchantTransferBillByTransferBillNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /fund-app/mch-transfer/transfer-bills/pre-transfer-with-authorization 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014399293 ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CreateFundAppMerchantTransferBillPreTransferWithAuthorizationResponse> ExecuteCreateFundAppMerchantTransferBillPreTransferWithAuthorizationAsync(this WechatTenpayClient client, Models.CreateFundAppMerchantTransferBillPreTransferWithAuthorizationRequest 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, "fund-app", "mch-transfer", "transfer-bills", "pre-transfer-with-authorization");
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CreateFundAppMerchantTransferBillPreTransferWithAuthorizationResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /fund-app/mch-transfer/transfer-bills/transfer 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014399371 ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CreateFundAppMerchantTransferBillTransferResponse> ExecuteCreateFundAppMerchantTransferBillTransferAsync(this WechatTenpayClient client, Models.CreateFundAppMerchantTransferBillTransferRequest 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, "fund-app", "mch-transfer", "transfer-bills", "transfer");
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CreateFundAppMerchantTransferBillTransferResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /fund-app/mch-transfer/user-confirm-authorization/out-authorization-no/{out_authorization_no} 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014399423 ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.GetFundAppMerchantTransferUserConfirmAuthorizationByOutAuthorizationNumberResponse> ExecuteGetFundAppMerchantTransferUserConfirmAuthorizationByOutAuthorizationNumberAsync(this WechatTenpayClient client, Models.GetFundAppMerchantTransferUserConfirmAuthorizationByOutAuthorizationNumberRequest 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, "fund-app", "mch-transfer", "user-confirm-authorization", "out-authorization-no", request.OutAuthorizationNumber);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.GetFundAppMerchantTransferUserConfirmAuthorizationByOutAuthorizationNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region MerchantTransfer/TransferToQQWalletBills
|
||||
|
||||
Reference in New Issue
Block a user