puti94 / react-native-puti-pay

基于 React Native 的微信支付,支付宝支付插件
281 stars 60 forks source link

0.62.1安卓微信支付回调出错 #50

Closed mengerzhuanyong closed 4 years ago

mengerzhuanyong commented 4 years ago

版本依赖 "react": "16.11.0", "react-native": "0.62.1", "react-native-puti-pay": "^1.4.0",

安卓logcat信息 D/MicroMsg.SDK.WXMsgImplComm: pass I/MicroMsg.SDK.WXApiImplV10: sendReq, req type = 5 D/MicroMsg.SDK.WXApiImplV10: pay, set wxappPayEntryClassname = com.tencent.mm.plugin.base.stub.WXPayEntryActivity D/MicroMsg.SDK.MMessageAct: send, targetPkgName = com.tencent.mm, targetClassName = com.tencent.mm.plugin.base.stub.WXPayEntryActivity D/MicroMsg.SDK.MMessageAct: send mm message, intent=Intent { flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXPayEntryActivity (has extras) } W/libEGL: EGLNativeWindowType 0x7e9b9f4010 disconnect failed D/mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format , EGLBoolean) returns 0x3000 W/InputMethodManager: startInputReason = 1 W/libEGL: EGLNativeWindowType 0x7e9b9f4010 disconnect failed I/zygote64: Do full code cache collection, code=124KB, data=95KB I/zygote64: After code cache collection, code=113KB, data=64KB

还请大佬测试一下,什么原因造成的

puti94 commented 4 years ago

在包名目录下创建wxapi文件夹,新建一个名为WXPayEntryActivity的activity继承 com.puti.paylib包名下的XWXPayEntryActivity。

` // wxapi/WXPayEntryActivity.jave package com.自己包名.wxapi; import com.puti.paylib.XWXPayEntryActivity; public class WXPayEntryActivity extends XWXPayEntryActivity { }

并配置Android Manifest XML <activity android:name=".wxapi.WXPayEntryActivity" android:label="@string/app_name" android:exported="true" /> `

看下是不是缺少这步骤

mengerzhuanyong commented 4 years ago

没有缺少,对着readme检查了好几遍。。

mengerzhuanyong commented 4 years ago

原因找到了,applicationid与项目包名不一致导致的