Class CertificateService
java.lang.Object
com.wechat.pay.java.service.certificate.CertificateService
证书服务
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondownloadCertificate
(byte[] apiV3Key) 下载微信支付平台证书列表,仅下载RSA证书downloadCertificate
(com.wechat.pay.java.core.cipher.AeadCipher aeadCipher) 下载微信支付平台证书列表,仅下载RSA证书downloadCertificate
(String requestPath, com.wechat.pay.java.core.cipher.AeadCipher aeadCipher, Function<String, X509Certificate> certificateGenerator) 下载微信支付平台证书列表
-
Method Details
-
downloadCertificate
下载微信支付平台证书列表,仅下载RSA证书- Parameters:
apiV3Key
- 微信支付 APIv3 密钥- Returns:
- 微信支付平台证书 X509Certificate 列表
- Throws:
com.wechat.pay.java.core.exception.HttpException
- 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。com.wechat.pay.java.core.exception.ValidationException
- 发送HTTP请求成功,验证微信支付返回签名失败。com.wechat.pay.java.core.exception.ServiceException
- 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。com.wechat.pay.java.core.exception.MalformedMessageException
- 服务返回成功,content-type不为application/json、解析返回体失败。
-
downloadCertificate
public List<X509Certificate> downloadCertificate(String requestPath, com.wechat.pay.java.core.cipher.AeadCipher aeadCipher, Function<String, X509Certificate> certificateGenerator) 下载微信支付平台证书列表- Parameters:
requestPath
- 下载证书的请求路径aeadCipher
- 认证加密器,用于解密证书certificateGenerator
- 从证书字符串到证书对象的生成器- Returns:
- 微信支付平台证书 X509Certificate 列表
- Throws:
com.wechat.pay.java.core.exception.HttpException
- 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。com.wechat.pay.java.core.exception.ValidationException
- 发送HTTP请求成功,验证微信支付返回签名失败。com.wechat.pay.java.core.exception.ServiceException
- 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。com.wechat.pay.java.core.exception.MalformedMessageException
- 服务返回成功,content-type不为application/json、解析返回体失败。
-
downloadCertificate
public List<X509Certificate> downloadCertificate(com.wechat.pay.java.core.cipher.AeadCipher aeadCipher) 下载微信支付平台证书列表,仅下载RSA证书- Parameters:
aeadCipher
- 认证加密器,用于解密证书- Returns:
- 证书列表
- Throws:
com.wechat.pay.java.core.exception.HttpException
- 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。com.wechat.pay.java.core.exception.ValidationException
- 发送HTTP请求成功,验证微信支付返回签名失败。com.wechat.pay.java.core.exception.ServiceException
- 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。com.wechat.pay.java.core.exception.MalformedMessageException
- 服务返回成功,content-type不为application/json、解析返回体失败。
-