confirmPlatformPaySetupIntent method

Future<SetupIntent> confirmPlatformPaySetupIntent({
  1. required String clientSecret,
  2. required PlatformPayConfirmParams confirmParams,
})

Launches the relevant native wallet sheet (Apple Pay on iOS and Google Pay on Android) in order to confirm a Stripe setup intent.

The clientSecret is the secret of the SetupIntent. ConfirmParams are parameters describing the GooglePay and Apple Pay configuration.

Throws an StripeError in case confirmPlatformPaySetupIntent fails.

Implementation

Future<SetupIntent> confirmPlatformPaySetupIntent({
  required String clientSecret,
  required PlatformPayConfirmParams confirmParams,
}) async {
  try {
    await _awaitForSettings();

    return _platform.platformPayConfirmSetupIntent(
      clientSecret: clientSecret,
      params: confirmParams,
    );
  } on StripeError {
    rethrow;
  }
}