[图片] 获取微信支付平台证书时失败
使用wechatpay-apiv3接口,httpClient.execute无法识别使用wechatpay-apiv3接口,httpClient.execute无法识别 public class HttpClient { //... String merchantId="xx"; String merchantSerialNumber="xx"; String merchantPrivateKey="xx"; String wechatpayCertificates="xx"; WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create() .withMerchant(merchantId, merchantSerialNumber, merchantPrivateKey) .withWechatpay(wechatpayCertificates); // ... 接下来,你仍然可以通过builder设置各种参数,来配置你的HttpClient // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签 HttpClient httpClient = builder.build(); HttpPost httpPost = new HttpPost("https://api.mch.weixin.qq.com/v3/apply4subject/applyment"); // 后面跟使用Apache HttpClient一样 HttpResponse response = httpClient.execute(httpPost);
2020-08-17