use of com.jpay.alipay.AliPayApiConfig in project leopard by tanhaichao.
the class AlipayClientImpl method init.
@PostConstruct
public void init() {
alipay = AlipayBuilder.newBuilder(partner, privateKey).build();
AliPayApiConfig aliPayApiConfig = AliPayApiConfig.New();
aliPayApiConfig.setAppId(partner);
aliPayApiConfig.setPrivateKey(privateKey);
aliPayApiConfig.setAlipayPublicKey(publicKey);
aliPayApiConfig.setServiceUrl(gatewayUrl);
aliPayApiConfig.setCharset("UTF-8");
aliPayApiConfig.setSignType("RSA2");
aliPayApiConfig.build();
System.err.println("appId:" + appId);
System.err.println("gatewayUrl:" + gatewayUrl);
AliPayApiConfigKit.putApiConfig(aliPayApiConfig);
alipayClient = new DefaultAlipayClient(gatewayUrl, appId, privateKey, "json", "UTF-8", publicKey, "RSA2");
}
Aggregations