mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-16 16:50:43 +08:00
fix(tenpayv3): 修复二级商户进件提交申请单接口因 URL 结尾反斜杠问题而无法正常请求的问题
This commit is contained in:
parent
560ef39609
commit
c4443ca101
@ -27,7 +27,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
// NOTICE: 注意 URL 结尾的反斜杠不能删除
|
// NOTICE: 注意本接口 URL 结尾的反斜杠不能删除
|
||||||
IFlurlRequest flurlReq = client
|
IFlurlRequest flurlReq = client
|
||||||
.CreateRequest(request, HttpMethod.Post, "applyment4sub", "applyment/");
|
.CreateRequest(request, HttpMethod.Post, "applyment4sub", "applyment/");
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Flurl;
|
|
||||||
using Flurl.Http;
|
using Flurl.Http;
|
||||||
|
|
||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||||
@ -15,7 +12,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
public static class WechatTenpayClientExecuteEcommerceApplymentsExtensions
|
public static class WechatTenpayClientExecuteEcommerceApplymentsExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>异步调用 [POST] /ecommerce/applyments 接口。</para>
|
/// <para>异步调用 [POST] /ecommerce/applyments/ 接口。</para>
|
||||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_1_1.shtml </para>
|
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_1_1.shtml </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="client"></param>
|
/// <param name="client"></param>
|
||||||
@ -27,8 +24,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
// NOTICE: 注意本接口 URL 结尾的反斜杠不能删除
|
||||||
IFlurlRequest flurlReq = client
|
IFlurlRequest flurlReq = client
|
||||||
.CreateRequest(request, HttpMethod.Post, "ecommerce", "applyments");
|
.CreateRequest(request, HttpMethod.Post, "ecommerce", "applyments/");
|
||||||
|
|
||||||
return await client.SendRequestWithJsonAsync<Models.CreateEcommerceApplymentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithJsonAsync<Models.CreateEcommerceApplymentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /ecommerce/applyments 接口的请求。</para>
|
/// <para>表示 [POST] /ecommerce/applyments/ 接口的请求。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[WechatTenpaySensitive]
|
[WechatTenpaySensitive]
|
||||||
public class CreateEcommerceApplymentRequest : WechatTenpayRequest
|
public class CreateEcommerceApplymentRequest : WechatTenpayRequest
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
using System;
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>表示 [POST] /ecommerce/applyments 接口的响应。</para>
|
/// <para>表示 [POST] /ecommerce/applyments/ 接口的响应。</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CreateEcommerceApplymentResponse : WechatTenpayResponse
|
public class CreateEcommerceApplymentResponse : WechatTenpayResponse
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user