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>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
public string? SubMerchantId { get; set; }
|
public string? SubMerchantId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@@ -22,6 +22,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置场景类型。
|
/// 获取或设置场景类型。
|
||||||
|
/// <para>默认值:Wap</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("type")]
|
[Newtonsoft.Json.JsonProperty("type")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||||
|
@@ -17,6 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置资金账户类型。
|
/// 获取或设置资金账户类型。
|
||||||
|
/// <para>默认值:ALL</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
@@ -28,10 +28,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置退款币种。
|
/// 获取或设置退款币种。
|
||||||
|
/// <para>默认值:CNY</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("currency")]
|
[Newtonsoft.Json.JsonProperty("currency")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||||
public string Currency { get; set; } = default!;
|
public string Currency { get; set; } = "CNY";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,21 +15,21 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置合作方类别。
|
/// 获取或设置合作方类别。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("type")]
|
[Newtonsoft.Json.JsonProperty("type")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||||
public string Type { get; set; } = string.Empty;
|
public string Type { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置合作方 AppId。与字段 <see cref="MerchantId"/> 二选一。
|
/// 获取或设置合作方 AppId。与字段 <see cref="MerchantId"/> 二选一。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("appid")]
|
[Newtonsoft.Json.JsonProperty("appid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||||
public string? AppId { get; set; }
|
public string? AppId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置合作方商户号。与字段 <see cref="AppId"/> 二选一。
|
/// 获取或设置合作方商户号。与字段 <see cref="AppId"/> 二选一。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("merchant_id")]
|
[Newtonsoft.Json.JsonProperty("merchant_id")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_id")]
|
[System.Text.Json.Serialization.JsonPropertyName("merchant_id")]
|
||||||
public string? MerchantId { get; set; }
|
public string? MerchantId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置授权业务类别。
|
/// 获取或设置授权业务类别。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("business_type")]
|
[Newtonsoft.Json.JsonProperty("business_type")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("business_type")]
|
[System.Text.Json.Serialization.JsonPropertyName("business_type")]
|
||||||
public string BusinessType { get; set; } = string.Empty;
|
public string BusinessType { get; set; } = string.Empty;
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置授权批次 ID。
|
/// 获取或设置授权批次 ID。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("stock_id")]
|
[Newtonsoft.Json.JsonProperty("stock_id")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("stock_id")]
|
[System.Text.Json.Serialization.JsonPropertyName("stock_id")]
|
||||||
public string? StockId { get; set; }
|
public string? StockId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -62,14 +62,14 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置合作方信息。
|
/// 获取或设置合作方信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
public Types.Partner Partner { get; set; } = new Types.Partner();
|
public Types.Partner Partner { get; set; } = new Types.Partner();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置被授权数据。
|
/// 获取或设置被授权数据。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
public Types.AuthorizedData AuthorizedData { get; set; } = new Types.AuthorizedData();
|
public Types.AuthorizedData AuthorizedData { get; set; } = new Types.AuthorizedData();
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置资金账户类型。
|
/// 获取或设置资金账户类型。
|
||||||
|
/// <para>默认值:NO_SUCC</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
@@ -11,8 +11,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
public string SubMerchantId { get; set; } = string.Empty;
|
public string SubMerchantId { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置子商户号。
|
/// 获取或设置子商户号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
public string SubMerchantId { get; set; } = string.Empty;
|
public string SubMerchantId { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("apply_permissions_token")]
|
[Newtonsoft.Json.JsonProperty("apply_permissions_token")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("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>
|
/// <summary>
|
||||||
/// 获取或设置场景类型。
|
/// 获取或设置场景类型。
|
||||||
|
/// <para>默认值:Order_Paid</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("type")]
|
[Newtonsoft.Json.JsonProperty("type")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||||
|
@@ -21,6 +21,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置币种。
|
/// 获取或设置币种。
|
||||||
|
/// <para>默认值:CNY</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("currency")]
|
[Newtonsoft.Json.JsonProperty("currency")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||||
|
@@ -26,6 +26,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置场景类型。
|
/// 获取或设置场景类型。
|
||||||
|
/// <para>默认值:Wap</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("type")]
|
[Newtonsoft.Json.JsonProperty("type")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||||
|
@@ -48,6 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置退款币种。
|
/// 获取或设置退款币种。
|
||||||
|
/// <para>默认值:CNY</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("currency")]
|
[Newtonsoft.Json.JsonProperty("currency")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||||
|
@@ -48,6 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置退款币种。
|
/// 获取或设置退款币种。
|
||||||
|
/// <para>默认值:CNY</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("currency")]
|
[Newtonsoft.Json.JsonProperty("currency")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
[System.Text.Json.Serialization.JsonPropertyName("currency")]
|
||||||
|
@@ -9,31 +9,31 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
public class WechatTenpayClientOptions
|
public class WechatTenpayClientOptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置请求超时时间(单位:毫秒)。</para>
|
/// 获取或设置请求超时时间(单位:毫秒)。
|
||||||
/// <para>默认值:30000</para>
|
/// <para>默认值:30000</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Timeout { get; set; } = 30 * 1000;
|
public int Timeout { get; set; } = 30 * 1000;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置微信支付 API 域名。</para>
|
/// 获取或设置微信支付 API 域名。
|
||||||
/// <para>默认值:<see cref="WechatTenpayEndpoints.DEFAULT"/></para>
|
/// <para>默认值:<see cref="WechatTenpayEndpoints.DEFAULT"/></para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? Endpoints { get; set; } = WechatTenpayEndpoints.DEFAULT;
|
public string? Endpoints { get; set; } = WechatTenpayEndpoints.DEFAULT;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置声明应答中的错误描述使用的自然语言语种。</para>
|
/// 获取或设置声明应答中的错误描述使用的自然语言语种。
|
||||||
/// <para>默认值:<i>根据操作系统自动生成</i></para>
|
/// <para>默认值:<i>根据操作系统自动生成</i></para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string UserAgent { get; set; } = $"OS/{Environment.OSVersion.Platform} SKIT.FlurlHttpClient.Wechat.Tenpay/{Assembly.GetExecutingAssembly().GetName().Version}";
|
public string UserAgent { get; set; } = $"OS/{Environment.OSVersion.Platform} SKIT.FlurlHttpClient.Wechat.Tenpay/{Assembly.GetExecutingAssembly().GetName().Version}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置声明应答中的错误描述使用的自然语言语种。</para>
|
/// 获取或设置声明应答中的错误描述使用的自然语言语种。
|
||||||
/// <para>默认值:zh_CN</para>
|
/// <para>默认值:zh_CN</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AcceptLanguage { get; set; } = "zh-CN";
|
public string AcceptLanguage { get; set; } = "zh-CN";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置微信支付 API 签名认证方式。</para>
|
/// 获取或设置微信支付 API 签名认证方式。
|
||||||
/// <para>默认值:<see cref="WechatTenpayAuthSchemes.WECHATPAY2_SHA256_RSA2048"/></para>
|
/// <para>默认值:<see cref="WechatTenpayAuthSchemes.WECHATPAY2_SHA256_RSA2048"/></para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AuthScheme { get; set; } = WechatTenpayAuthSchemes.WECHATPAY2_SHA256_RSA2048;
|
public string AuthScheme { get; set; } = WechatTenpayAuthSchemes.WECHATPAY2_SHA256_RSA2048;
|
||||||
|
@@ -8,15 +8,14 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
public abstract class WechatTenpayRequest : IWechatRequest
|
public abstract class WechatTenpayRequest : IWechatRequest
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置请求超时时间(单位:毫秒)。</para>
|
/// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 <see cref="WechatTenpayClient"/> 时的 <see cref="WechatTenpayClientOptions.Timeout"/> 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。
|
||||||
/// <para>如果不指定将使用构造 <see cref="WechatTenpayClient"/> 时的 <see cref="WechatTenpayClientOptions.Timeout"/> 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。</para>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
public virtual int? Timeout { get; set; }
|
public virtual int? Timeout { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>获取或设置微信请求使用的微信支付平台证书序列号。</para>
|
/// 获取或设置微信请求使用的微信支付平台证书序列号。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
Reference in New Issue
Block a user