飘动条纹付款中的“无法识别的应用。请确保您信任此应用,然后再继续”。

时间:2020-03-02 17:08:01

标签: android flutter stripe-payments flutter-dependencies android-9.0-pie

我是初学者。我需要连接条纹支付和颤动。所以我使用stripe_payment:^ 1.0.6(https://pub.flutter-io.cn/packages/stripe_payment/versions/1.0.6)。使用这个例子,我试图建立支付门方式。但他们的错误为“无法识别的应用。请确保您信任此应用,然后再继续”。

enter image description here

在按下连续按钮后,提供

enter image description here错误。

在我的小部件按钮中具有以下代码,

void _payWithCard() {
StripePayment.createSourceWithParams(SourceParams(
  type: 'ideal',
  amount: 333,
  currency: 'eur',
  returnURL: 'projectXXXXX://payment_redirect',
)).then((source) {
  setState(() {
    _source = source;
  });
}).catchError(setError);

}

他们有一些与我的Stripe付款网关相关的代码。

@override

void initState(){ super.initState();

StripePayment.setOptions(StripeOptions(
    publishableKey: "piok_test_pIoKxxxxxxxxxxxxxxTzgP009ywg8JNs",
    merchantId: "projectXXXXXsolutions",
    androidPayMode: 'test'));
initPlatformState();

}

  initPlatformState() async {
if (_type == UniLinksType.string) {
  await initPlatformStateForStringUniLinks();
} else {
  await initPlatformStateForUriUniLinks();
}
print('init platform state');

}

// Attach a second listener to the stream
getLinksStream().listen((String link) {
  print(' got link success: $link');
  lartChechOutLoading(context);
}, onError: (err) {
  print('got err: $err');
});
// Get the latest link
String initialLink;
Uri initialUri;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
  initialLink = await getInitialLink();
  print('initial link: $initialLink');
  if (initialLink != null) initialUri = Uri.parse(initialLink);
} on PlatformException {
  initialLink = 'Failed to get initial link.';
  initialUri = null;
} on FormatException {
  initialLink = 'Failed to parse the initial link as Uri.';
  initialUri = null;
}


// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) return;

setState(() {
  _latestLink = initialLink;
  _latestUri = initialUri;
});

}

// Get the latest Uri
Uri initialUri;
String initialLink;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
  initialUri = await getInitialUri();
  print('initial uri: ${initialUri?.path}'
      ' ${initialUri?.queryParametersAll}');
  initialLink = initialUri?.toString();
} on PlatformException {
  initialUri = null;
  initialLink = 'Failed to get initial uri.';
} on FormatException {
  initialUri = null;
  initialLink = 'Bad parse the initial link as Uri.';
}
    --

0 个答案:

没有答案