Explorar el Código

fix: getClient分支明确分离 — bizType用密钥, 无bizType用证书

alphaH hace 21 horas
padre
commit
7e229f29fb

+ 2 - 6
java/src/main/java/com/payment/platform/core/alipay/AlipayClientFactory.java

@@ -202,14 +202,10 @@ public class AlipayClientFactory {
                 profile.getAppId(), profile.getAppPrivateKey(), profile.getAlipayPublicKey(),
                 profile.getServerUrl(), profile.getFormat(), profile.getCharset(), profile.getSignType());
 
-        // 资金类接口统一使用公钥证书模式
-        config.setAppCertContent(profile.getAppCertContent());
-        config.setAlipayPublicCertContent(profile.getAlipayPublicCertContent());
-        config.setRootCertContent(profile.getRootCertContent());
-
+        // bizType 分支使用普通公钥模式(非资金类接口)
         try {
             AlipayClient client = new DefaultAlipayClient(config);
-            log.info("服务商[{}]业务[{}]客户端创建成功, appId={}, mode=cert",
+            log.info("服务商[{}]业务[{}]客户端创建成功, appId={}, mode=key",
                     profile.getServiceProviderId(), profile.getBizType(), profile.getAppId());
             return client;
         } catch (AlipayApiException e) {

+ 1 - 1
java/src/main/resources/application.yml

@@ -38,7 +38,7 @@ spring:
 
   data:
     redis:
-      host: localhost
+      host: redis
       port: 6379
       database: 1
       password: '123456#xjz'