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

@@ -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` 特性,相比较手动解密,可能会存在一定的性能开销。