获取支付宝client修改

This commit is contained in:
2025-09-02 23:27:47 +08:00
parent aaa3c16459
commit 122d771a2a
2 changed files with 5 additions and 22 deletions

View File

@ -37,29 +37,11 @@ public class AlipayServiceImpl implements AlipayService {
@Autowired
private AlipaySdkUtil alipaySdkUtil;
@Value("${ali.pay.app-id}")
private String appId;
@Value("${ali.pay.notify-url}")
@Value("${alipay.notify-url}")
private String notifyUrl;
@Value("${ali.pay.refund-notify-url}")
private String refundNotifyUrl;
@Value("${ali.pay.privateKey}")
private String privateKey;
// @Value("${alipay.miniapp.publicKey}")
// private String publicKey;
@Value("${ali.pay.appCertPath}")
private String appCertPath;
@Value("${ali.pay.alipayCertPath}")
private String alipayCertPath;
@Value("${ali.pay.alipayRootCertPath}")
private String alipayRootCertPath;
@Value("${alipay.alipay-public-cert-path}")
private String alipayPublicCertPath;
@Autowired
@ -311,7 +293,7 @@ public class AlipayServiceImpl implements AlipayService {
@Override
public boolean verifyNotifySign(Long companyId, Map<String, String> params) {
try {
return AlipaySignature.rsaCertCheckV1(params, alipayCertPath, "UTF-8", "RSA2");
return AlipaySignature.rsaCertCheckV1(params, alipayPublicCertPath, "UTF-8", "RSA2");
} catch (AlipayApiException e) {
log.error("支付宝通知签名验证异常公司ID: {}", companyId, e);
return false;

View File

@ -89,3 +89,4 @@ alipay:
alipay-public-cert-path: /root/cert/appCertPublicKey_2021005174658269.crt
ali-public-cert-path: /root/cert/alipayCertPublicKey_RSA2.crt
alipay-root-cert-path: /root/cert/alipayRootCert.crt
notify-url: https://www.minbo.wang:8020/api/alipay/notify