mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +08:00
enhance: 优化逻辑
This commit is contained in:
@@ -230,12 +230,9 @@ public class SignatureProvider {
|
||||
throw new PayException("cant obtain the response body");
|
||||
}
|
||||
ArrayNode certificates = bodyObjectNode.withArray("data");
|
||||
if (certificates.isArray() && certificates.size() > 0) {
|
||||
CERTIFICATE_SET.forEach(x509WechatCertificateInfo -> {
|
||||
if (Objects.equals(tenantId, x509WechatCertificateInfo.getTenantId())) {
|
||||
CERTIFICATE_SET.remove(x509WechatCertificateInfo);
|
||||
}
|
||||
});
|
||||
if (certificates.isArray() && !certificates.isEmpty()) {
|
||||
CERTIFICATE_SET.removeIf(x509WechatCertificateInfo ->
|
||||
Objects.equals(tenantId, x509WechatCertificateInfo.getTenantId()));
|
||||
final CertificateFactory certificateFactory = CertificateFactory.getInstance("X509", BC_PROVIDER);
|
||||
certificates.forEach(objectNode -> {
|
||||
JsonNode encryptCertificate = objectNode.get("encrypt_certificate");
|
||||
|
||||
Reference in New Issue
Block a user