| | |
| | | |
| | | public class AlipayUtil { |
| | | |
| | | private final static Logger logger = org.slf4j.LoggerFactory.getLogger("debugLogger"); |
| | | private final static Logger logger = org.slf4j.LoggerFactory.getLogger("alipayLogger"); |
| | | |
| | | private static DefaultAlipayClient alipayClient = null; |
| | | |
| | |
| | | AlipayUtil.class.getClassLoader().getResource("alipay/alipayCertPublicKey_RSA2.crt").getPath()); |
| | | certAlipayRequest.setRootCertPath( |
| | | AlipayUtil.class.getClassLoader().getResource("alipay/alipayRootCert.crt").getPath()); |
| | | logger.info("证书路径:{}", certAlipayRequest.getCertPath()); |
| | | try { |
| | | alipayClient = new DefaultAlipayClient(certAlipayRequest); |
| | | } catch (AlipayApiException e) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |