Comments (6)
文档没有说明nonce_str 是转账支付完成之后返回参数吧,你在进行查询的时候返回什么异常信息,能否提供一下,或者能否说下你是怎么进行矫正的
from pay-java-parent.
文档没有说明nonce_str 是转账支付完成之后返回参数吧,你在进行查询的时候返回什么异常信息,能否提供一下,或者能否说下你是怎么进行矫正的
service.transferQuery("XXXX", WxTransferType.GETTRANSFERINFO.name());
后来看了下好像确实这个参数可以是随机的,但是缺少appId
from pay-java-parent.
from pay-java-parent.
单元测试如下
public static void main(String[] args) {
WxPayConfigStorage wxPayConfigStorage = new WxPayConfigStorage();
wxPayConfigStorage.setMchId("XXX");
wxPayConfigStorage.setAppid("XXX");
wxPayConfigStorage.setKeyPrivate("XXX");
wxPayConfigStorage.setKeyPublic("XXX");
wxPayConfigStorage.setPayType("wxPay");
wxPayConfigStorage.setSignType("MD5");
wxPayConfigStorage.setInputCharset("utf-8");
HttpConfigStorage httpConfigStorage = new HttpConfigStorage();
httpConfigStorage.setStorePassword("XX");
String certPath = "XXX";
httpConfigStorage.setKeystore(certPath);
//设置ssl证书对应的存储方式输入流,这里默认为文件地址
httpConfigStorage.setCertStoreType(CertStoreType.PATH);
// 有问题的
WxPayService service = new WxPayService(wxPayConfigStorage, httpConfigStorage);
Map<String, Object> map = service.transferQuery("XXX", WxTransferType.GETTRANSFERINFO.name());
// 没有问题的方式
Map<String, Object> parameters = new TreeMap();
WxPayConfigStorage payConfigStorage = service.getPayConfigStorage();
parameters.put("appid", payConfigStorage.getAppid());
parameters.put("mch_id", payConfigStorage.getPid());
parameters.put("partner_trade_no", "XXX");
parameters.put("nonce_str", SignUtils.randomStr());
parameters.put("sign", service.createSign(SignUtils.parameterText(parameters, "&", new String[]{"sign"}), payConfigStorage.getInputCharset()));
map = (Map) service.getHttpRequestTemplate().postForObject(service.getReqUrl(WxTransferType.GETTRANSFERINFO), XML.getMap2Xml(parameters), JSONObject.class, new Object[0]);
}
from pay-java-parent.
对不住,只实现了转账到卡的实现
from pay-java-parent.
之前已经修复,关闭
from pay-java-parent.
Related Issues (20)
- paypal v2 ordersCapture请求时缺少请求头导致capture失败 HOT 3
- 支付宝沙箱环境访问地址失效 HOT 1
- 考虑新增一个国际支付包吗
- 什么时候可以支持云闪付、海外MasterCard卡、Visa卡、JCB卡、google pay、Apple Pay吗
- paypal v1 退款返回Requested resource ID was not found. HOT 2
- com.egzosn.pay.common.util.Util#conversionCentAmount计算溢出
- common中的http连接池初始化逻辑有问题,PoolingHttpClientConnectionManager反复初始化
- 银联B2B支付时提示没权限 HOT 2
- 支付发起的结果问题 HOT 4
- TLS的版本无法修改 HOT 2
- 请问这里设置证书setApiClientKeyP12一直报如下错如何解决 HOT 2
- 支付宝统一下单 HOT 1
- 加载微信 API 证书出错 HOT 2
- 接入微信V3支付出现空指针问题 HOT 1
- paypal v2完成订单接口调用失败 HOT 4
- v3删除分账接收方请求url地址错误
- 2.14.4版本 微信支付 v3 启动报错 HOT 1
- 我想增加一个多appid支持 HOT 1
- hello,考虑支持jdk11吗 HOT 2
- paypal /v2/checkout/orders/{order_id}/capture 什么时候执行 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pay-java-parent.