From 3f3c37d286f6eb72f62fdc97ee6ab73e3a177836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=88=E7=83=9F?= Date: Tue, 3 Dec 2024 11:51:57 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20#3424=20=E3=80=90=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E3=80=91=E5=8A=A0=E8=BD=BD=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=89=8D=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C=EF=BC=8C=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/github/binarywang/wxpay/config/WxPayConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java index 857b937d8..3c260226d 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java @@ -449,7 +449,7 @@ public class WxPayConfig { */ private Object[] p12ToPem() { String key = getMchId(); - if (StringUtils.isBlank(key)) { + if (StringUtils.isBlank(key) || StringUtils.isBlank(this.getKeyPath())) { return null; } @@ -466,7 +466,7 @@ public class WxPayConfig { X509Certificate x509Certificate = (X509Certificate) certificate; return new Object[]{privateKey, x509Certificate}; } catch (Exception e) { - log.error("加载证书时发生异常", e); + log.error("加载p12证书时发生异常", e); } return null;