Commit 7f70b1fe94d2674c2be6d80617b8c5594cae39c6

Authored by 芋道源码
Committed by Gitee
2 parents c2a50c4d 86a47481

!1044 【功能优化】支持支付宝接口内容加密

Merge pull request !1044 from 芋道源码/develop
yudao-module-pay/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/alipay/AlipayPayClientConfig.java
... ... @@ -27,6 +27,11 @@ public class AlipayPayClientConfig implements PayClientConfig {
27 27 public static final Integer MODE_CERTIFICATE = 2;
28 28  
29 29 /**
  30 + * 接口内容加密方式 - AES 加密
  31 + */
  32 + public static final String ENC_TYPE_AES = "AES";
  33 +
  34 + /**
30 35 * 签名算法类型 - RSA
31 36 */
32 37 public static final String SIGN_TYPE_DEFAULT = "RSA2";
... ... @@ -92,6 +97,19 @@ public class AlipayPayClientConfig implements PayClientConfig {
92 97 @NotBlank(message = "指定根证书内容字符串不能为空", groups = {ModeCertificate.class})
93 98 private String rootCertContent;
94 99  
  100 + /**
  101 + * 接口内容加密方式,如果为空,将使用无加密方式
  102 + * 如果要加密,目前支付宝只有 AES 一种加密方式
  103 + * <a href="https://opendocs.alipay.com/common/02mse3">支付宝开放平台</a>
  104 + * @see AlipayPayClientConfig#ENC_TYPE_AES
  105 + */
  106 + private String encryptType;
  107 +
  108 + /**
  109 + * 接口内容加密的私钥
  110 + */
  111 + private String encryptKey;
  112 +
95 113 public interface ModePublicKey {
96 114 }
97 115  
... ...