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

iOS微信支付成功后,收不到回调。最新版 fluwx: ^4.2.4+1 #544

Open
guipingliu opened this issue May 24, 2023 · 2 comments
Open

Comments

@guipingliu
Copy link

final Fluwx fluwx = Fluwx();
late Function(WeChatResponse) responseListener;

@OverRide
void dispose() {
// TODO: implement dispose
super.dispose();
fluwx.removeSubscriber(responseListener);
}

@OverRide
void onInit() {
// TODO: implement onReady
super.onInit();

responseListener = (response) {

  debugPrint('oninit responseListener response ${response.isSuccessful}');
  if (response is WeChatPaymentResponse) {
    debugPrint('oninit responseListener ${response.isSuccessful}');
    if (response.isSuccessful) {
      fetchUserInfo();
    } else {
      ShowToast(response.errStr?? response.toString());
    }
  } else {
    ShowToast(response.errStr?? response.toString());
  }
};

fluwx.addSubscriber(responseListener);

}

@guipingliu guipingliu changed the title iOS微信支付成功后,收不到回调fluwx: ^4.2.4+1 iOS微信支付成功后,收不到回调。最新版 fluwx: ^4.2.4+1 May 24, 2023
@zhoujia456888
Copy link

zhoujia456888 commented Jul 31, 2023

查看yaml中的universal_link和registerApi方法中的universalLink是否和微信申请时填写的一致。我刚开始是universalLink填错了,修改过来就行了
image

@zhoujia456888
Copy link

另外有三个地方的微信APPID都要对应上。
1.pubspec.yaml中配置的app_id,
image

2.Xcode中URL Types中的URL Schemes
image

  1. fluwx.registerApi中的appId
    image

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

2 participants