Skip to content

Commit 87a6a60

Browse files
committed
修改函数名称
1 parent 3453bfd commit 87a6a60

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/wechat/pay/contrib/apache/httpclient/cert/CertificatesManager.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public boolean verify(String serialNumber, byte[] message, String signature) {
102102
public X509Certificate getValidCertificate() {
103103
X509Certificate certificate;
104104
try {
105-
certificate = CertificatesManager.this.getValidCertificate(merchantId);
105+
certificate = CertificatesManager.this.getLatestCertificate(merchantId);
106106
} catch (NotFoundException e) {
107107
throw new NoSuchElementException("没有有效的微信支付平台证书");
108108
}
@@ -171,7 +171,7 @@ public void stop() {
171171
}
172172
}
173173

174-
private X509Certificate getValidCertificate(String merchantId)
174+
private X509Certificate getLatestCertificate(String merchantId)
175175
throws NotFoundException {
176176
if (merchantId == null || merchantId.isEmpty()) {
177177
throw new IllegalArgumentException("merchantId为空");
@@ -200,7 +200,8 @@ private X509Certificate getValidCertificate(String merchantId)
200200
* 获取商户号为merchantId的验签器
201201
*
202202
* @param merchantId 商户号
203-
* @return verifier
203+
* @return 验签器
204+
* @throws NotFoundException merchantId/merchantCertificates/apiV3Key/credentials为空
204205
*/
205206
public Verifier getVerifier(String merchantId) throws NotFoundException {
206207
// 若商户信息不存在,返回错误

0 commit comments

Comments
 (0)