Skip to content

Commit 284d0ab

Browse files
[FIX] CollectBankAccountToken (#2264)
1 parent 574acfb commit 284d0ab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/stripe_platform_interface/lib/src/method_channel_stripe.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -593,18 +593,18 @@ class MethodChannelStripe extends StripePlatform {
593593
{'clientSecret': clientSecret, 'params': params.toJson()},
594594
);
595595

596-
// workaround for fact that created is parsed as string from Stripe android
597-
final created = result?['token']['created'];
598-
if (created != null && created is String) {
599-
result?['token']['created'] = int.tryParse(created);
600-
}
601-
602596
_financialConnectionsEventHandler = params.onEvent;
603597

604598
if (result!.containsKey('error')) {
605599
throw ResultParser<void>(parseJson: (json) => {}).parseError(result);
606600
}
607601

602+
// workaround for fact that created is parsed as string from Stripe android
603+
final created = result?['token']['created'];
604+
if (created != null && created is String) {
605+
result?['token']['created'] = int.tryParse(created);
606+
}
607+
608608
return FinancialConnectionTokenResult.fromJson(result);
609609
}
610610

0 commit comments

Comments
 (0)