Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信回调错误 #72

Open
droidhuang opened this issue May 21, 2019 · 4 comments
Open

微信回调错误 #72

droidhuang opened this issue May 21, 2019 · 4 comments

Comments

@droidhuang
Copy link

在微信未登录情况下,从我们App调用
String charge = resp.get("Charge");
Intent intent = new Intent(getActivity(), PaymentActivity.class);
intent.putExtra(PaymentActivity.EXTRA_CHARGE, charge);
startActivityForResult(intent, REQUEST_CODE_PAYMENT);

并登陆微信,进行支付并支付成功,并正常返回

在我们App onActivityResult回调回来的是cancel

@droidhuang
Copy link
Author

在微信正常登录情况下,调起微信支付并返回 回调正常,微信未登录情况下是异常的

@samurai00
Copy link
Contributor

我这边测试是 OK 的。登出微信,打开 app,调用支付,自动跳转到(弹出)微信,输入用户名密码,登录,输入支付密码,支付完成,点下面的完成返回。 app 拿到的是 "success"。
设备是 Pixel 3,系统是 Android Q Beta。

试试换一下调用方法,光从你贴的代码来看,调用方式不太正确。

Pingpp.createPayment(activity, charge);

或者

String packageName = activity.getPackageName();
Intent intent = new Intent();
ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
intent.setComponent(componentName);
intent.putExtra(PaymentActivity.EXTRA_CHARGE, charge);
activity.startActivityForResult(intent, REQUEST_CODE_PAYMENT);

@droidhuang
Copy link
Author

我们这边测试机是华为P10 P20 系统9.0 微信版本:7.0.4 都是存在问题的

@zjcjoaquin
Copy link

碰到了同样的问题
也是在微信未登录情况下
调用方法
Pingpp.createPayment(activity, charge);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants