PingPlusPlus / pingpp-android

413 stars 190 forks source link

调微信支付秒退 handleIntent fail, intent not from weixin msg #59

Closed hewz closed 7 years ago

hewz commented 7 years ago

通过demo中的链接获取charge对象

            var req = {
                "channel": "wx",
                "amount": 2,
        "livemode": false
         };
            $http({
                method: "post",
                url: "http://218.244.151.190/demo/charge",
                headers: {'Content-Type': 'application/x-www-form-urlencoded'},
                data: CustomParam(req)
            }).then(function (response) {
                pingpp.createPayment(response.data, function(result){
                    console.log('suc: '+result);  //"success"
                }, function(result){
                    console.log('err: '+result);  //"fail"|"cancel"|"invalid"
                });
            }, function (error) {
                console.log(error);
            });

能调起微信界面,但是秒退,日志如下:

08-30 10:15:09.699 30707-30707/? D/MicroMsg.PaySdk.WXFactory: createWXAPI, appId = wx3eba2286c6acb2b6, checkSignature = false

08-30 10:15:09.699 30707-30707/? D/MicroMsg.SDK.WXApiImplV10: <init>, appId = wx3eba2286c6acb2b6, checkSignature = false

08-30 10:15:09.701 30707-30707/? D/MicroMsg.SDK.WXMsgImplComm: ignore wechat app signature validation

08-30 10:15:09.702 30707-30707/? D/MicroMsg.SDK.WXMsgImplComm: ignore wechat app signature validation

08-30 10:15:09.713 30707-30707/? D/MicroMsg.SDK.WXMsgImplComm: ignore wechat app signature validation

08-30 10:15:09.713 30707-30707/? D/MicroMsg.SDK.WXApiImplV10: registerApp, appId = wx3eba2286c6acb2b6

08-30 10:15:09.713 30707-30707/? D/MicroMsg.SDK.WXApiImplV10: registerApp, appId = wx3eba2286c6acb2b6

08-30 10:15:09.713 30707-30707/? D/MicroMsg.SDK.WXApiImplV10: register app com.sct.xgenban

08-30 10:15:09.714 30707-30707/? D/MicroMsg.SDK.MMessage: send mm message, intent=Intent { act=com.tencent.mm.plugin.openapi.Intent.ACTION_HANDLE_APP_REGISTER (has extras) }, perm=com.tencent.mm.permission.MM_MESSAGE

08-30 10:15:09.714 30707-30707/? I/MicroMsg.SDK.WXApiImplV10: handleIntent fail, intent not from weixin msg

08-30 10:15:09.715 30707-30707/? D/MicroMsg.SDK.WXMsgImplComm: ignore wechat app signature validation

08-30 10:15:09.715 30707-30707/? D/MicroMsg.SDK.WXApiImplV10: sendReq, req type = 5

08-30 10:15:09.724 30707-30707/? D/MicroMsg.SDK.WXApiImplV10: pay, set wxappPayEntryClassname = com.tencent.mm.plugin.base.stub.WXPayEntryActivity

08-30 10:15:09.724 30707-30707/? D/MicroMsg.SDK.MMessageAct: send, targetPkgName = com.tencent.mm, targetClassName = com.tencent.mm.plugin.base.stub.WXPayEntryActivity

08-30 10:15:09.730 30707-30707/? D/MicroMsg.SDK.MMessageAct: send mm message, intent=Intent { flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXPayEntryActivity (has extras) }
dong11 commented 7 years ago

@hewz 通过 Android SDK 还是 H5 SDK 调起支付的?

dong11 commented 7 years ago

@hewz 调起微信支付会检查包名和签名是否与 charge相对应,所以测试微信支付的时候需要使用自己的 charge

hewz commented 7 years ago

@dong11 Android SDK。谢谢 回头用自己接口试试