initialise method
Future<void>
initialise({
- required String publishableKey,
- String? stripeAccountId,
- ThreeDSecureConfigurationParams? threeDSecureParams,
- String? merchantIdentifier,
- String? urlScheme,
- bool? setReturnUrlSchemeOnAndroid,
override
Implementation
@override
Future<void> initialise({
required String publishableKey,
String? stripeAccountId,
ThreeDSecureConfigurationParams? threeDSecureParams,
String? merchantIdentifier,
String? urlScheme,
bool? setReturnUrlSchemeOnAndroid,
}) async {
this._urlScheme = urlScheme;
if (__stripe != null) {
// Check if the new stripeAccountId is different
if (__stripe!.stripeAccount != stripeAccountId) {
// Re-initialize with new stripeAccountId
await stripe_js.loadStripe();
var stripeOption = stripe_js.StripeOptions();
stripeOption.stripeAccount = stripeAccountId;
__stripe = stripe_js.Stripe(publishableKey, stripeOption);
}
return;
}
await stripe_js.loadStripe();
var stripeOption = stripe_js.StripeOptions();
if (stripeAccountId != null) {
stripeOption.stripeAccount = stripeAccountId;
}
__stripe = stripe_js.Stripe(publishableKey, stripeOption);
}