public CertItem GetCertItem(IAlipayRequest <T> request, string responseBody) { if (string.IsNullOrEmpty(responseBody)) { return(null); } var json = JsonSerializer.Deserialize <IDictionary>(responseBody, jsonSerializerOptions); var certItem = new CertItem() { Sign = json[AlipayConstants.SIGN]?.ToString(), CertSN = json[AlipayConstants.ALIPAY_CERT_SN]?.ToString(), SignSourceDate = GetSignSourceData(request, responseBody) }; return(certItem); }
public CertItem GetCertItem(IAlipayRequest <T> request, string responseBody) { if (string.IsNullOrEmpty(responseBody)) { return(null); } var certItem = new CertItem(); var json = JsonSerializer.Deserialize <IDictionary>(responseBody); certItem.Sign = json["sign"]?.ToString(); certItem.CertSN = json["alipay_cert_sn"]?.ToString(); var signSourceData = GetSignSourceData(request, responseBody); certItem.SignSourceDate = signSourceData; return(certItem); }