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

微信支付 文章 2020-08-17 11:41 2536 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


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
微信支付自动提现失败,失败原因:银行处理失败!这什么情况?
微信7.0.17 微信浏览器 当直播时,预览图片会暂停音视频
有一个小程序是之前微信端的,现在有部分要兼容企业微信,怎么设置才能在开发者工具上调试?
服务商模式微信支付问题
小游戏申请公测之后一直没有量进来,麻烦帮忙补量,谢谢
随便看看
如何解决云数据库查询结果缺少数据问题? 567
getSetting的scope.userInfo一直为true,那如何判断是否授权? 782
营业执照上法人变更是否影响公众号年审? 694
怎么将发布的小程序代码下载下来 1132
想学习下云函数入口函数,这种多路由的方式,是什么原理? 341
微信小程序分享参数为啥不生效? 461
text中文本没有设计点击样式,但是点击底下会出现下划线? 302
申请加快审批? 271
获取手机号需要用户点击button触发,能否通过js模拟点击触发呢? 381
小程序通过webview跳转到一个已授权的域名提交表单数据,会跳转到一个腾讯的非业务域名 400