feat(tenpayv2): 支持新版沙箱(即仿真测试系统)域名

This commit is contained in:
Fu Diwei
2022-11-08 19:02:40 +08:00
parent 7b541485b7
commit 0472223bb6
2 changed files with 6 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
string json = JsonSerializer.Serialize(data); string json = JsonSerializer.Serialize(data);
string xml = Utilities.XmlUtility.ConvertFromJson(json); string xml = Utilities.XmlUtility.ConvertFromJson(json);
using HttpContent httpContent = new StringContent(xml, Encoding.UTF8, "text/xml"); using HttpContent httpContent = new StringContent(xml, Encoding.UTF8, "application/xml");
using IFlurlResponse flurlResponse = await SendRequestAsync(flurlRequest, httpContent: httpContent, cancellationToken); using IFlurlResponse flurlResponse = await SendRequestAsync(flurlRequest, httpContent: httpContent, cancellationToken);
return await WrapResponseWithXmlAsync<T>(flurlResponse, cancellationToken); return await WrapResponseWithXmlAsync<T>(flurlResponse, cancellationToken);
} }

View File

@@ -1,4 +1,6 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2 using System;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
{ {
/// <summary> /// <summary>
/// 微信支付 API 接口域名。 /// 微信支付 API 接口域名。
@@ -18,6 +20,7 @@
/// <summary> /// <summary>
/// 沙箱域名。 /// 沙箱域名。
/// </summary> /// </summary>
public const string SANDBOX = "https://api.mch.weixin.qq.com/sandboxnew"; [Obsolete("")]
public const string SANDBOX = "https://api.mch.weixin.qq.com/xdc/apiv2sandbox";
} }
} }