mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-21 02:58:06 +08:00
fix(tenpayv3): 修复代码分析工具检测出的 API 定义问题
This commit is contained in:
@@ -11,8 +11,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@@ -22,6 +22,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置场景类型。
|
||||
/// <para>默认值:Wap</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
|
@@ -17,6 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户类型。
|
||||
/// <para>默认值:ALL</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
@@ -28,10 +28,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款币种。
|
||||
/// <para>默认值:CNY</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
public string Currency { get; set; } = default!;
|
||||
public string Currency { get; set; } = "CNY";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -17,6 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置资金账户类型。
|
||||
/// <para>默认值:NO_SUCC</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
@@ -11,8 +11,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string SubMerchantId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string SubMerchantId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("apply_permissions_token")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("apply_permissions_token")]
|
||||
public string ApplyPermissionsToken { get; set; } = string.Empty;
|
||||
public string ApplyPermissionsToken { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
@@ -60,6 +60,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场景类型。
|
||||
/// <para>默认值:Order_Paid</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
|
@@ -21,6 +21,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置币种。
|
||||
/// <para>默认值:CNY</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
|
@@ -26,6 +26,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置场景类型。
|
||||
/// <para>默认值:Wap</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
|
@@ -48,6 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款币种。
|
||||
/// <para>默认值:CNY</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
|
@@ -48,6 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款币种。
|
||||
/// <para>默认值:CNY</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("currency")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||
|
@@ -9,31 +9,31 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
public class WechatTenpayClientOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>获取或设置请求超时时间(单位:毫秒)。</para>
|
||||
/// 获取或设置请求超时时间(单位:毫秒)。
|
||||
/// <para>默认值:30000</para>
|
||||
/// </summary>
|
||||
public int Timeout { get; set; } = 30 * 1000;
|
||||
|
||||
/// <summary>
|
||||
/// <para>获取或设置微信支付 API 域名。</para>
|
||||
/// 获取或设置微信支付 API 域名。
|
||||
/// <para>默认值:<see cref="WechatTenpayEndpoints.DEFAULT"/></para>
|
||||
/// </summary>
|
||||
public string? Endpoints { get; set; } = WechatTenpayEndpoints.DEFAULT;
|
||||
|
||||
/// <summary>
|
||||
/// <para>获取或设置声明应答中的错误描述使用的自然语言语种。</para>
|
||||
/// 获取或设置声明应答中的错误描述使用的自然语言语种。
|
||||
/// <para>默认值:<i>根据操作系统自动生成</i></para>
|
||||
/// </summary>
|
||||
public string UserAgent { get; set; } = $"OS/{Environment.OSVersion.Platform} SKIT.FlurlHttpClient.Wechat.Tenpay/{Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
|
||||
/// <summary>
|
||||
/// <para>获取或设置声明应答中的错误描述使用的自然语言语种。</para>
|
||||
/// 获取或设置声明应答中的错误描述使用的自然语言语种。
|
||||
/// <para>默认值:zh_CN</para>
|
||||
/// </summary>
|
||||
public string AcceptLanguage { get; set; } = "zh-CN";
|
||||
|
||||
/// <summary>
|
||||
/// <para>获取或设置微信支付 API 签名认证方式。</para>
|
||||
/// 获取或设置微信支付 API 签名认证方式。
|
||||
/// <para>默认值:<see cref="WechatTenpayAuthSchemes.WECHATPAY2_SHA256_RSA2048"/></para>
|
||||
/// </summary>
|
||||
public string AuthScheme { get; set; } = WechatTenpayAuthSchemes.WECHATPAY2_SHA256_RSA2048;
|
||||
|
@@ -8,15 +8,14 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
public abstract class WechatTenpayRequest : IWechatRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>获取或设置请求超时时间(单位:毫秒)。</para>
|
||||
/// <para>如果不指定将使用构造 <see cref="WechatTenpayClient"/> 时的 <see cref="WechatTenpayClientOptions.Timeout"/> 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。</para>
|
||||
/// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 <see cref="WechatTenpayClient"/> 时的 <see cref="WechatTenpayClientOptions.Timeout"/> 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public virtual int? Timeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <para>获取或设置微信请求使用的微信支付平台证书序列号。</para>
|
||||
/// 获取或设置微信请求使用的微信支付平台证书序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
Reference in New Issue
Block a user