feat(tenpayv3): 重新实现 CertificateManager,支持记录生效时间、过期时间等信息

This commit is contained in:
Fu Diwei
2021-11-25 11:58:06 +08:00
parent 70d05e3aaa
commit bfa6557314
9 changed files with 251 additions and 31 deletions

View File

@@ -50,9 +50,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Sample_Net5.Services.BackgroundSe
if (response.IsSuccessful())
{
client.DecryptResponseEncryptedData(ref response);
foreach (var cert in response.CertificateList)
foreach (var certificateModel in response.CertificateList)
{
_certificateManager.SetCertificate(cert.SerialNumber, cert.EncryptCertificate.CipherText);
_certificateManager.AddEntry(new CertificateEntry(certificateModel));
}
_logger.LogInformation("刷新微信商户平台证书成功。");