javen205 / jpay Goto Github PK
View Code? Open in Web Editor NEW🔥对微信App支付、支付宝App支付、银联APP支付的二次封装,对外提供一个相对简单的接口以及支付结果的回调
Home Page: http://javen.blog.csdn.net
🔥对微信App支付、支付宝App支付、银联APP支付的二次封装,对外提供一个相对简单的接口以及支付结果的回调
Home Page: http://javen.blog.csdn.net
I/MicroMsg.SDK.WXApiImplV10: handleIntent, cmd = 5
E/MicroMsg.SDK.WXApiImplV10: handleIntent fail, ex = Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter message
PayResult payResult = new PayResult((Map<String, String>) msg.obj);
Log.e("aliPay call ",payResult.toString());
String resultStatus = payResult.getResultStatus();
if (mJPayListener ==null){
return;
}
// https://docs.open.alipay.com/204/105301/
if(payResult == null) {
mJPayListener.onPayError(RESULT_ERROR,"结果解析错误");
return;
}
这个判断payResult==null永远不成立,new出来的
此问题是没有给mJPayListener
赋值,下版本会修复,修改方法如下
public void startWXPay(String appId,String partnerId,String prepayId,
String nonceStr,String timeStamp,String sign,JPayListener listener){
mJPayListener = listener;
init(appId);
if (!checkWx()) {
if(listener != null) {
listener.onPayError(JPay.WEIXIN_VERSION_LOW,"未安装微信或者微信版本过低");
}
return;
}
PayReq request = new PayReq();
request.appId = appId;
request.partnerId = partnerId;
request.prepayId= prepayId;
request.packageValue = "Sign=WXPay";
request.nonceStr=nonceStr;
request.timeStamp= timeStamp;
request.sign= sign;
mIWXAPI.sendReq(request);
}
我试了当前Activity的对象,报错了
没有看到你用微信appId啊
Error:(201, 13) Failed to resolve: com.github.javen205.JPay:jpaysdk:latest.release.0.0.4
ERROR: Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.github.javen205.JPay:AliPay:0.0.5. @Javen205
Could not parse POM https://jitpack.io/com/github/javen205/JPay/AliPay/0.0.5/AliPay-0.0.5.pom
> Missing required attribute: dependency groupId
你把context传进单例,容易导致内存泄露
如题问一下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.