From c0718d4db9b31e1c9bd953bd3c696ca92c94ceac Mon Sep 17 00:00:00 2001 From: Jackson Lee <62976701+jaxnz@users.noreply.github.com> Date: Mon, 15 Aug 2022 00:29:25 +1200 Subject: [PATCH] fix: No payment sheet has been initialized yet on iOS (#860) --- packages/stripe/lib/src/stripe.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/stripe/lib/src/stripe.dart b/packages/stripe/lib/src/stripe.dart index cd6cf8e83..18a92a497 100644 --- a/packages/stripe/lib/src/stripe.dart +++ b/packages/stripe/lib/src/stripe.dart @@ -329,6 +329,7 @@ class Stripe { Future initPaymentSheet({ required SetupPaymentSheetParameters paymentSheetParameters, }) async { + assert(!(paymentSheetParameters.applePay == true && instance._merchantIdentifier == null), 'merchantIdentifier must be specified if you are using Apple Pay. Please refer to this article to get a merchant identifier: https://support.stripe.com/questions/enable-apple-pay-on-your-stripe-account'); await _awaitForSettings(); await _platform.initPaymentSheet(paymentSheetParameters); }