Skip to content

Commit

Permalink
fix close#167
Browse files Browse the repository at this point in the history
  • Loading branch information
roc916 authored Apr 15, 2024
1 parent 6852651 commit 2ca5ce0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Essensoft.Paylink.WeChatPay/V3/WeChatPayClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ private async Task CheckResponseSignAsync(WeChatPayHeaders headers, string body,
/// </remarks>
private static void EncryptPrivacyProperty(WeChatPayObject obj, RSA rsa)
{
if(obj == null)
{
return;
}

foreach (var propertyInfo in obj.GetType().GetProperties())
{
if (propertyInfo.PropertyType == typeof(string)) // 加密字符串
Expand Down Expand Up @@ -326,6 +331,11 @@ private static void EncryptPrivacyProperty(WeChatPayObject obj, RSA rsa)
/// </remarks>
private static void DecryptPrivacyProperty(WeChatPayObject obj, RSA rsa)
{
if(obj == null)
{
return;
}

foreach (var propertyInfo in obj.GetType().GetProperties())
{
if (propertyInfo.PropertyType == typeof(string)) // 加密字符串
Expand Down

0 comments on commit 2ca5ce0

Please sign in to comment.