feat(tenpayv3): bump version to v2.1.3

This commit is contained in:
Fu Diwei 2021-12-03 16:55:29 +08:00
parent 96f1f262e7
commit 666deca8d4
6 changed files with 13 additions and 5 deletions

View File

@ -204,6 +204,10 @@
<summary>[展开查看] SKIT.FlurlHttpClient.Wechat.TenpayV3 模块更新日志</summary>
- Release 2.1.3
- **修复**:修复部分响应模型解密敏感数据字段时抛出异常的问题。([GitHub Issue #17](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat/issues/17)
- Release 2.1.2
- **修复**:修复部分嵌套类型中属性的敏感数据不能自动加密的问题。([Gitee Issue #I4K40Y](https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat/issues/I4K40Y)
@ -212,7 +216,7 @@
- Release 2.1.1
- **修复**:修复部分场景下 RSA 加密请求敏感信息字段错误的问题。([Gitee Issue #I4JIZC](https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat/issues/I4JIZC)
- **修复**:修复部分请求模型加密敏感数据字段时抛出异常的问题。([Gitee Issue #I4JIZC](https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat/issues/I4JIZC)
- Release 2.1.0

View File

@ -54,9 +54,10 @@ public class MyFakeEvent : WechatTenpayEvent.Types.IDecryptedResource
### 敏感信息字段
如果你扩展的自定义请求或响应模型中包含敏感信息字段,并希望可以通过本库提供的 `EncryptRequestSensitiveProperty()``DecryptResponseSensitiveProperty()` 两个扩展方法来实现自动加、解密,那么你需要在定义模型时额外指定一个特性:
如果你扩展的自定义请求或响应模型中包含敏感信息字段,并希望可以通过本库提供的 `EncryptRequestSensitiveProperty()``DecryptResponseSensitiveProperty()` 两个扩展方法来实现自动加、解密,那么你需要在定义模型时额外指定特性:
```csharp
[WechatTenpaySensitive]
public class MyFakeRequest : WechatTenpayRequest
{
[Newtonsoft.Json.JsonProperty("my_fake_props")]
@ -65,6 +66,7 @@ public class MyFakeRequest : WechatTenpayRequest
public string MyFakeProps { get; set; }
}
[WechatTenpaySensitive]
public class MyFakeResponse : WechatTenpayResponse
{
[Newtonsoft.Json.JsonProperty("my_fake_props")]

View File

@ -85,7 +85,7 @@ var client = new WechatTenpayClient(options);
需要注意的是,使用该扩展方法前需先下载好平台证书,并存入全局的 `CertificateManager`。有关 `CertificateManager` 的更多介绍,请参阅下一小节。
此外,该扩展方法使用反射、并依赖 `WechatTenpaySensitivePropertyAttribute` 特性,相比较手动加密,可能会存在一定的性能开销。
此外,该扩展方法使用反射、并依赖 `WechatTenpaySensitiveAttribute`、`WechatTenpaySensitivePropertyAttribute` 特性,相比较手动加密,可能会存在一定的性能开销。
---

View File

@ -47,4 +47,4 @@ var client = new WechatTenpayClient(options);
这样,本库会在实际收到响应后自动为你调用 `DecryptResponseSensitiveProperty()` 方法。
此外,该扩展方法使用反射、并依赖 `WechatTenpaySensitivePropertyAttribute` 特性,相比较手动解密,可能会存在一定的性能开销。
此外,该扩展方法使用反射、并依赖 `WechatTenpaySensitiveAttribute`、`WechatTenpaySensitivePropertyAttribute` 特性,相比较手动解密,可能会存在一定的性能开销。

View File

@ -12,7 +12,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat</PackageProjectUrl>
<PackageTags>Flurl.Http Wechat Weixin MicroMessage Tenpay WechatPay WeixinPay Wxpay 微信 微信支付 微信商户</PackageTags>
<Version>2.1.2</Version>
<Version>2.1.3</Version>
<Description>基于 Flurl.Http 的微信支付 API v3 版客户端,支持直连商户、服务商模式,支持基础支付、代金券、商家券、委托营销、消费卡、支付有礼、银行定向促活、微信支付分、微信先享卡、支付即服务、点金计划、智慧商圈、电商收付通、消费者投诉、商户违规通知、批量转账到零钱等功能。</Description>
<Authors>Fu Diwei</Authors>
<RepositoryType>git</RepositoryType>

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@ -56,6 +57,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
var mock = new Models.GetEcommerceApplymentByOutRequestNumberResponse()
{
RawStatus = 200,
RawHeaders = new ReadOnlyDictionary<string, string>(new Dictionary<string, string>() { { "K", "V" } }),
ApplymentState = MockText,
AccountValidation = new Models.GetEcommerceApplymentByOutRequestNumberResponse.Types.AccountValidation()
{