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