使用wechatpay-apiv3接口,httpClient.execute无法识别

微信支付 文章 2020-08-17 11:41 2537 0 全屏看文

AI助手支持GPT4.0

使用wechatpay-apiv3接口,httpClient.execute无法识别Using the wechatpay-apiv3 interface, httpClient.execute cannot be recognized

使用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);


Using wechatpay-apiv3 interface, httpClient.execute Unable to recognize public class httpclient {/ /... String merchandisind = XX; string merchantserialnumber = XX; string merchant privatekey = XX; string wechatpayhttpclientbuilder builder = wechat PayHttpClientBuilder.create () .withMerchant(merchantId, Merchant serialnumber, merchant private key). With wechatpayhttpcertificates; / / next, you can still set various parameters through builder to configure your httpclient / / the httpclient constructed through wechatpayhttpclientbuilder automatically processes and verifies the signature of httpclient httpclient= builder.build (); HttpPost httpPost = new HttpPost(" https://api.mch.weixin.qq.com/v3/apply4subject/applyment "); / / httpresponse response is the same as using Apache httpclient= httpClient.execute (httpPost);

回答:

支付技术助手8:

你好,你这边指的是运行失败?商户号、密钥、证书信息是否有正确配置上去?https://wechatpay-api.gitbook.io/wechatpay-api-v3/jie-kou-wen-dang/ping-tai-zheng-shu

光辉克金:

获取微信支付平台证书时失败

Joshua Zheng:

懒的弄了,我直接用了第三方的包,IJPay-WxPay调用它的WxPayApi.v3Execution(.....)然后自己改造下,就用了,微信官方的优点麻烦

-EOF-

AI助手支持GPT4.0