|
|
@@ -202,19 +202,15 @@ public class AlipayClientFactory {
|
|
|
profile.getAppId(), profile.getAppPrivateKey(), profile.getAlipayPublicKey(),
|
|
|
profile.getServerUrl(), profile.getFormat(), profile.getCharset(), profile.getSignType());
|
|
|
|
|
|
- // 证书模式: 若有证书内容则设置(优先级高于公钥)
|
|
|
// 资金类接口统一使用公钥证书模式
|
|
|
- if (true) {
|
|
|
- config.setAppCertContent(profile.getAppCertContent());
|
|
|
- config.setAlipayPublicCertContent(profile.getAlipayPublicCertContent());
|
|
|
- config.setRootCertContent(profile.getRootCertContent());
|
|
|
- }
|
|
|
+ config.setAppCertContent(profile.getAppCertContent());
|
|
|
+ config.setAlipayPublicCertContent(profile.getAlipayPublicCertContent());
|
|
|
+ config.setRootCertContent(profile.getRootCertContent());
|
|
|
|
|
|
try {
|
|
|
AlipayClient client = new DefaultAlipayClient(config);
|
|
|
- log.info("服务商[{}]业务[{}]客户端创建成功, appId={}, mode={}",
|
|
|
- profile.getServiceProviderId(), profile.getBizType(), profile.getAppId(),
|
|
|
- profile.getAppCertContent() != null ? "cert" : "key");
|
|
|
+ log.info("服务商[{}]业务[{}]客户端创建成功, appId={}, mode=cert",
|
|
|
+ profile.getServiceProviderId(), profile.getBizType(), profile.getAppId());
|
|
|
return client;
|
|
|
} catch (AlipayApiException e) {
|
|
|
log.error("服务商[{}]业务[{}]客户端创建失败", profile.getServiceProviderId(), profile.getBizType(), e);
|