We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fefe737 commit 3e1a38aCopy full SHA for 3e1a38a
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java
@@ -345,7 +345,7 @@ public CloseableHttpClient initApiV3HttpClient() throws WxPayException {
345
}
346
347
// 加载api私钥
348
- if (merchantPrivateKey == null && StringUtils.isNotBlank(this.getPrivateKeyPath())) {
+ if (merchantPrivateKey == null && (StringUtils.isNotBlank(this.getPrivateKeyPath()) || StringUtils.isNotBlank(this.getPrivateKeyString()) || null != this.privateKeyContent)) {
349
try (InputStream keyInputStream = this.loadConfigInputStream(this.getPrivateKeyString(), this.getPrivateKeyPath(),
350
this.privateKeyContent, "privateKeyPath")) {
351
merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream);
0 commit comments