diff --git a/example/android/settings.gradle b/example/android/settings.gradle index c66670a5..870557f4 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -19,7 +19,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.7.3" apply false - id "org.jetbrains.kotlin.android" version "1.8.10" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false } include ":app" diff --git a/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart b/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart index 32e1e86a..05aaee30 100644 --- a/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart +++ b/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart @@ -424,10 +424,16 @@ class MethodChannelStripe extends StripePlatform { }) async { bool? isSupported; if (params == null) { - isSupported = - await _methodChannel.invokeMethod('isPlatformPaySupported', { + final result = + await _methodChannel.invokeMethod('isPlatformPaySupported', { 'params': {}, }); + + if (result is bool) { + isSupported = result; + } else { + StripeException.fromJson(result); + } } else { isSupported = await _methodChannel .invokeMethod('isPlatformPaySupported', {'params': params.toJson()});