mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-12 19:21:21 +08:00
feat(tenpayv3): 新增 Credentials 类型,存储初始化客户端时的凭证副本
This commit is contained in:
@@ -18,7 +18,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
if (client == null) throw new ArgumentNullException(nameof(client));
|
||||
if (string.IsNullOrEmpty(callbackJson)) throw new ArgumentNullException(callbackJson);
|
||||
|
||||
return client.FlurlJsonSerializer.Deserialize<WechatTenpayEvent>(callbackJson);
|
||||
return client.JsonSerializer.Deserialize<WechatTenpayEvent>(callbackJson);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -57,7 +57,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
try
|
||||
{
|
||||
plainJson = Utilities.AESUtility.DecryptWithGCM(
|
||||
key: client.WechatMerchantV3Secret,
|
||||
key: client.Credentials.MerchantV3Secret,
|
||||
iv: resource.Nonce,
|
||||
aad: resource.AssociatedData,
|
||||
cipherText: resource.CipherText
|
||||
@@ -73,7 +73,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
throw new Exceptions.WechatTenpayEventDecryptionException("Unknown encrypt algorithm of the resource.");
|
||||
}
|
||||
|
||||
return client.FlurlJsonSerializer.Deserialize<T>(plainJson);
|
||||
return client.JsonSerializer.Deserialize<T>(plainJson);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user