获取支付宝client修改
This commit is contained in:
@ -37,29 +37,11 @@ public class AlipayServiceImpl implements AlipayService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private AlipaySdkUtil alipaySdkUtil;
|
private AlipaySdkUtil alipaySdkUtil;
|
||||||
|
|
||||||
@Value("${ali.pay.app-id}")
|
@Value("${alipay.notify-url}")
|
||||||
private String appId;
|
|
||||||
|
|
||||||
@Value("${ali.pay.notify-url}")
|
|
||||||
private String notifyUrl;
|
private String notifyUrl;
|
||||||
|
|
||||||
@Value("${ali.pay.refund-notify-url}")
|
@Value("${alipay.alipay-public-cert-path}")
|
||||||
private String refundNotifyUrl;
|
private String alipayPublicCertPath;
|
||||||
|
|
||||||
@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;
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -311,7 +293,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|||||||
@Override
|
@Override
|
||||||
public boolean verifyNotifySign(Long companyId, Map<String, String> params) {
|
public boolean verifyNotifySign(Long companyId, Map<String, String> params) {
|
||||||
try {
|
try {
|
||||||
return AlipaySignature.rsaCertCheckV1(params, alipayCertPath, "UTF-8", "RSA2");
|
return AlipaySignature.rsaCertCheckV1(params, alipayPublicCertPath, "UTF-8", "RSA2");
|
||||||
} catch (AlipayApiException e) {
|
} catch (AlipayApiException e) {
|
||||||
log.error("支付宝通知签名验证异常,公司ID: {}", companyId, e);
|
log.error("支付宝通知签名验证异常,公司ID: {}", companyId, e);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -89,3 +89,4 @@ alipay:
|
|||||||
alipay-public-cert-path: /root/cert/appCertPublicKey_2021005174658269.crt
|
alipay-public-cert-path: /root/cert/appCertPublicKey_2021005174658269.crt
|
||||||
ali-public-cert-path: /root/cert/alipayCertPublicKey_RSA2.crt
|
ali-public-cert-path: /root/cert/alipayCertPublicKey_RSA2.crt
|
||||||
alipay-root-cert-path: /root/cert/alipayRootCert.crt
|
alipay-root-cert-path: /root/cert/alipayRootCert.crt
|
||||||
|
notify-url: https://www.minbo.wang:8020/api/alipay/notify
|
||||||
|
|||||||
Reference in New Issue
Block a user