presentApplePay method

Future<void> presentApplePay(
  1. ApplePayPresentParams params
)

Presents an Apple payment sheet using params for additional configuration. See ApplePayPresentParams for more details.

Throws an StripeError in case presenting the payment sheet fails.

Implementation

Future<void> presentApplePay(
  ApplePayPresentParams params,
) async {
  await _awaitForSettings();
  if (!isApplePaySupported.value) {
    //throw StripeError<ApplePayError>
    //(ApplePayError.canceled, 'APPLE_PAY_NOT_SUPPORTED_MESSAGE');
  }
  try {
    await _platform.presentApplePay(params);
  } on StripeError {
    rethrow;
  }
}