Giter VIP home page Giter VIP logo

jpay's Issues

第一次启动支付界面没弹开

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出来的

微信支付不回调方法。

image
支付成功和取消支付后都不回调onPaySuccess和onPayCancel()方法。是什么原因呢。提供的Demo也是一样。

微信支付没有回调

此问题是没有给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);
    }

内存泄露

你把context传进单例,容易导致内存泄露

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.