Skip to content

Commit db15aec

Browse files
🐛 #3825 【微信支付】修复初始化api v3请求时证书序列号值生成条件错误的问题
1 parent 6504f5d commit db15aec

File tree

1 file changed

+1
-1
lines changed
  • weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config

1 file changed

+1
-1
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public CloseableHttpClient initApiV3HttpClient() throws WxPayException {
343343
certificate = (X509Certificate) objects[1];
344344
this.certSerialNo = certificate.getSerialNumber().toString(16).toUpperCase();
345345
}
346-
if (certificate == null && StringUtils.isBlank(this.getCertSerialNo()) && (StringUtils.isNotBlank(this.getPrivateCertPath()) || StringUtils.isNotBlank(this.getPrivateCertString())) || this.getPrivateCertContent() != null) {
346+
if (certificate == null && StringUtils.isBlank(this.getCertSerialNo()) && (StringUtils.isNotBlank(this.getPrivateCertPath()) || StringUtils.isNotBlank(this.getPrivateCertString()) || this.getPrivateCertContent() != null)) {
347347
try (InputStream certInputStream = this.loadConfigInputStream(this.getPrivateCertString(), this.getPrivateCertPath(),
348348
this.privateCertContent, "privateCertPath")) {
349349
certificate = PemUtils.loadCertificate(certInputStream);

0 commit comments

Comments
 (0)