chunecai
chunecai
@yorkie 我的Android的支付也遇到这个问题,跟着文档添加了WXPayEntryActivity 也不行、 能正常支付,就是回调不了。直接闪一下就没了。 const result = await WeChat.pay( { partnerId: res.partnerid, // 商家向财付通申请的商家id,备注:此处appid就是接口返回的商家id prepayId: res.prepayid, // 预支付订单 timeStamp: res.timestamp.toString(), // 时间戳,防重发 nonceStr: res.noncestr, // 随机串,防重发 package: res.package?res.package:"Sign=WXPay", // 商家根据财付通文档填写的数据和签名...
版本1.9.2 、1.9.4都试过了,回调失败。
@yorkie 调用了分享的,直接闪退了。但是支付是可以的,只是回调不了。、
你是说这里的配置吗? Add following lines into android/settings.gradle include ':RCTWeChat' project(':RCTWeChat').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wechat/android') Add following lines into your android/app/build.gradle in section dependencies dependencies { compile project(':RCTWeChat') // Add this line...
react-native link生成的: dependencies { // react-native link 自动生成begin compile project(':react-native-wechat') // react-native link 自动生成end // 文档 // compile project(':RCTWeChat') ... } settings.gradle : rootProject.name = 'fujj' // react-native link 自动生成...
@yorkie WXPayEntryActivity 就是按照文档编写的。import android.app.Activity; import android.os.Bundle; import com.theweflex.react.WeChatModule; public class WXEntryActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WeChatModule.handleIntent(getIntent()); finish(); } }
@yorkie react-native-wechat的index.js 我加了弹框,发现DeviceEventEmitter.addListener 没有监听到,只弹出1111,2222没有弹出 alert('11111'); DeviceEventEmitter.addListener('WeChat_Resp', resp => { alert('2222'); emitter.emit(resp.type, resp); });
@yorkie https://github.com/yorkie/react-native-wechat/issues/225 使用react-native link react-native-wechat 的时候支付还能回来自己的App,只是没继续往下走,使用文档的RCTWeChat 直接App闪退了。
@yorkie 非debug模式,都是签名打包真机测试的。 使用react-native run-android 签名不一致,没找到debug 用签名的方式。
 支付取消后直App 重启刷新了,没有走到这个方法 public void onResp(BaseResp baseResp) 没见到弹出数据