Skip to content

Commit 2d74905

Browse files
committed
Merge branch 'main' into sync
2 parents 8f0ea07 + 92c08e7 commit 2d74905

File tree

19 files changed

+269
-166
lines changed

19 files changed

+269
-166
lines changed

CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,74 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2025-11-15
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- There are no breaking changes in this release.
15+
16+
Packages with other changes:
17+
18+
- [`flutter_stripe` - `v12.1.1`](#flutter_stripe---v1211)
19+
20+
---
21+
22+
#### `flutter_stripe` - `v12.1.1`
23+
24+
25+
## 2025-11-15
26+
27+
### Changes
28+
29+
---
30+
31+
Packages with breaking changes:
32+
33+
- There are no breaking changes in this release.
34+
35+
Packages with other changes:
36+
37+
- [`flutter_stripe_web` - `v7.1.1`](#flutter_stripe_web---v711)
38+
39+
---
40+
41+
#### `flutter_stripe_web` - `v7.1.1`
42+
43+
44+
## 2025-11-15
45+
46+
### Changes
47+
48+
---
49+
50+
Packages with breaking changes:
51+
52+
- There are no breaking changes in this release.
53+
54+
Packages with other changes:
55+
56+
- [`stripe_platform_interface` - `v12.1.1`](#stripe_platform_interface---v1211)
57+
- [`flutter_stripe_web` - `v7.1.1`](#flutter_stripe_web---v711)
58+
- [`flutter_stripe` - `v12.1.1`](#flutter_stripe---v1211)
59+
60+
Packages with dependency updates only:
61+
62+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
63+
64+
- `flutter_stripe_web` - `v7.1.1`
65+
- `flutter_stripe` - `v12.1.1`
66+
67+
---
68+
69+
#### `stripe_platform_interface` - `v12.1.1`
70+
71+
- FIX: #2064 crash collect bankaccounttoken
72+
73+
674
## 2025-10-28
775

876
### Changes

docs/sheet.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,6 @@ AndroidManifest.xml
225225
```
226226

227227
This guide assumes you’re using the latest version of the Stripe Android SDK.
228-
229-
build.gradle
230-
231-
```
232-
dependencies {
233-
implementation 'com.stripe:stripe-android:17.1.1'
234-
}
235-
```
236228
For more details, see Google Pay’s Set up Google Pay API for Android.
237229

238230
#### Add Google Pay

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (flutterVersionName == null) {
2626

2727
android {
2828
namespace 'com.flutter.stripe.example'
29-
compileSdk 35
29+
compileSdk 36
3030

3131
compileOptions {
3232
sourceCompatibility JavaVersion.VERSION_17

packages/stripe/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 12.1.1
2+
3+
**Fixes**
4+
- 2064 crash collect bankaccounttoken
5+
16
## 12.1.0
27

38
**Features**

packages/stripe/lib/src/model/apple_pay_button.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,4 @@ enum ApplePayButtonType {
2020
}
2121

2222
/// Predefined styles for the Apple pay button.
23-
enum ApplePayButtonStyle {
24-
white,
25-
whiteOutline,
26-
black,
27-
automatic,
28-
}
23+
enum ApplePayButtonStyle { white, whiteOutline, black, automatic }

packages/stripe/lib/src/stripe.dart

Lines changed: 64 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'dart:async';
22

33
import 'package:flutter/foundation.dart';
4-
import 'package:meta/meta.dart';
54
import 'package:stripe_platform_interface/stripe_platform_interface.dart';
65

76
/// [Stripe] is the facade of the library and exposes the operations that can be
@@ -102,13 +101,13 @@ class Stripe {
102101
/// [publishableKey], [merchantIdentifier], [stripeAccountId],
103102
/// [threeDSecureParams], [urlScheme], [setReturnUrlSchemeOnAndroid]
104103
Future<void> applySettings() => _initialise(
105-
publishableKey: publishableKey,
106-
merchantIdentifier: merchantIdentifier,
107-
stripeAccountId: stripeAccountId,
108-
threeDSecureParams: threeDSecureParams,
109-
urlScheme: urlScheme,
110-
setReturnUrlSchemeOnAndroid: setReturnUrlSchemeOnAndroid,
111-
);
104+
publishableKey: publishableKey,
105+
merchantIdentifier: merchantIdentifier,
106+
stripeAccountId: stripeAccountId,
107+
threeDSecureParams: threeDSecureParams,
108+
urlScheme: urlScheme,
109+
setReturnUrlSchemeOnAndroid: setReturnUrlSchemeOnAndroid,
110+
);
112111

113112
/// Exposes a [ValueListenable] whether or not GooglePay (on Android) or Apple Pay (on iOS)
114113
/// is supported for this device.
@@ -133,8 +132,9 @@ class Stripe {
133132
}) async {
134133
await _awaitForSettings();
135134
final isSupported = await _platform.isPlatformPaySupported(
136-
params: googlePay,
137-
paymentRequestOptions: webPaymentRequestCreateOptions);
135+
params: googlePay,
136+
paymentRequestOptions: webPaymentRequestCreateOptions,
137+
);
138138

139139
_isPlatformPaySupported ??= ValueNotifier(false);
140140
_isPlatformPaySupported?.value = isSupported;
@@ -276,8 +276,10 @@ class Stripe {
276276
}) async {
277277
await _awaitForSettings();
278278
try {
279-
final paymentMethod =
280-
await _platform.createPaymentMethod(params, options);
279+
final paymentMethod = await _platform.createPaymentMethod(
280+
params,
281+
options,
282+
);
281283
return paymentMethod;
282284
} on StripeError catch (error) {
283285
throw StripeError(message: error.message, code: error.message);
@@ -370,12 +372,16 @@ class Stripe {
370372
/// several seconds and it is important to not resubmit the form.
371373
///
372374
/// Throws a [StripeException] when confirming the handle card action fails.
373-
Future<PaymentIntent> handleNextAction(String paymentIntentClientSecret,
374-
{String? returnURL}) async {
375+
Future<PaymentIntent> handleNextAction(
376+
String paymentIntentClientSecret, {
377+
String? returnURL,
378+
}) async {
375379
await _awaitForSettings();
376380
try {
377-
final paymentIntent = await _platform
378-
.handleNextAction(paymentIntentClientSecret, returnURL: returnURL);
381+
final paymentIntent = await _platform.handleNextAction(
382+
paymentIntentClientSecret,
383+
returnURL: returnURL,
384+
);
379385
return paymentIntent;
380386
} on StripeError {
381387
//throw StripeError<CardActionError>(error.code, error.message);
@@ -389,13 +395,15 @@ class Stripe {
389395
///
390396
/// Throws a [StripeException] when confirming the handle card action fails.
391397
Future<SetupIntent> handleNextActionForSetupIntent(
392-
String setupIntentClientSecret,
393-
{String? returnURL}) async {
398+
String setupIntentClientSecret, {
399+
String? returnURL,
400+
}) async {
394401
await _awaitForSettings();
395402
try {
396403
final paymentIntent = await _platform.handleNextActionForSetupIntent(
397-
setupIntentClientSecret,
398-
returnURL: returnURL);
404+
setupIntentClientSecret,
405+
returnURL: returnURL,
406+
);
399407
return paymentIntent;
400408
} on StripeError {
401409
rethrow;
@@ -416,7 +424,10 @@ class Stripe {
416424
await _awaitForSettings();
417425
try {
418426
final setupIntent = await _platform.confirmSetupIntent(
419-
paymentIntentClientSecret, params, options);
427+
paymentIntentClientSecret,
428+
params,
429+
options,
430+
);
420431
return setupIntent;
421432
} on StripeException {
422433
rethrow;
@@ -428,14 +439,10 @@ class Stripe {
428439
/// Returns a single-use token.
429440
///
430441
/// Throws [StripeError] in case creating the token fails.
431-
Future<String?> createTokenForCVCUpdate(
432-
String cvc,
433-
) async {
442+
Future<String?> createTokenForCVCUpdate(String cvc) async {
434443
await _awaitForSettings();
435444
try {
436-
final tokenId = await _platform.createTokenForCVCUpdate(
437-
cvc,
438-
);
445+
final tokenId = await _platform.createTokenForCVCUpdate(cvc);
439446
return tokenId;
440447
} on StripeError {
441448
//throw StripeError<CardActionError>(error.code, error.message);
@@ -451,9 +458,10 @@ class Stripe {
451458
required SetupPaymentSheetParameters paymentSheetParameters,
452459
}) async {
453460
assert(
454-
!(paymentSheetParameters.applePay != null &&
455-
instance._merchantIdentifier == null),
456-
'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');
461+
!(paymentSheetParameters.applePay != null &&
462+
instance._merchantIdentifier == null),
463+
'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',
464+
);
457465
await _awaitForSettings();
458466
return _platform.initPaymentSheet(paymentSheetParameters);
459467
}
@@ -473,7 +481,8 @@ class Stripe {
473481
/// Method used to confirm to the user that the intent is created successfull
474482
/// or not successfull when using a defferred payment method.
475483
Future<void> intentCreationCallback(
476-
IntentCreationCallbackParams params) async {
484+
IntentCreationCallbackParams params,
485+
) async {
477486
await _awaitForSettings();
478487
return await _platform.intentCreationCallback(params);
479488
}
@@ -506,7 +515,8 @@ class Stripe {
506515

507516
/// Inititialise google pay
508517
@Deprecated(
509-
'Use [confirmPlatformPaySetupIntent] or [confirmPlatformPayPaymentIntent] or [createPlatformPayPaymentMethod] instead.')
518+
'Use [confirmPlatformPaySetupIntent] or [confirmPlatformPayPaymentIntent] or [createPlatformPayPaymentMethod] instead.',
519+
)
510520
Future<void> initGooglePay(GooglePayInitParams params) async {
511521
return await _platform.initGooglePay(params);
512522
}
@@ -515,7 +525,8 @@ class Stripe {
515525
///
516526
/// Throws a [StripeException] in case it is failing
517527
@Deprecated(
518-
'Use [confirmPlatformPaySetupIntent] or [confirmPlatformPayPaymentIntent].')
528+
'Use [confirmPlatformPaySetupIntent] or [confirmPlatformPayPaymentIntent].',
529+
)
519530
Future<void> presentGooglePay(PresentGooglePayParams params) async {
520531
return await _platform.presentGooglePay(params);
521532
}
@@ -525,7 +536,8 @@ class Stripe {
525536
/// Throws a [StripeException] in case it is failing
526537
@Deprecated('Use [createPlatformPayPaymentMethod instead.')
527538
Future<PaymentMethod> createGooglePayPaymentMethod(
528-
CreateGooglePayPaymentParams params) async {
539+
CreateGooglePayPaymentParams params,
540+
) async {
529541
return await _platform.createGooglePayPaymentMethod(params);
530542
}
531543

@@ -566,11 +578,9 @@ class Stripe {
566578
/// iOS at the moment.
567579
Future<PaymentIntent> verifyPaymentIntentWithMicrodeposits({
568580
/// Whether the clientsecret is associated with setup or paymentintent
569-
570581
required bool isPaymentIntent,
571582

572583
/// The clientSecret of the payment and setup intent
573-
574584
required String clientSecret,
575585

576586
/// Parameters to verify the microdeposits.
@@ -596,7 +606,8 @@ class Stripe {
596606
/// on this particular device.
597607
/// Throws [StripeException] in case creating the token fails.
598608
Future<CanAddCardToWalletResult> canAddCardToWallet(
599-
CanAddCardToWalletParams params) async {
609+
CanAddCardToWalletParams params,
610+
) async {
600611
return await _platform.canAddCardToWallet(params);
601612
}
602613

@@ -616,7 +627,8 @@ class Stripe {
616627
617628
Future<FinancialConnectionTokenResult> collectBankAccountToken({
618629
required String clientSecret,
619-
CollectBankAccountTokenParams? params,
630+
CollectBankAccountTokenParams params =
631+
const CollectBankAccountTokenParams(),
620632
}) async {
621633
try {
622634
return _platform.collectBankAccountToken(
@@ -637,7 +649,8 @@ class Stripe {
637649
638650
Future<FinancialConnectionSessionResult> collectFinancialConnectionsAccounts({
639651
required String clientSecret,
640-
CollectFinancialConnectionsAccountsParams? params,
652+
CollectFinancialConnectionsAccountsParams params =
653+
const CollectFinancialConnectionsAccountsParams(),
641654
}) async {
642655
try {
643656
return _platform.collectFinancialConnectionsAccounts(
@@ -650,8 +663,9 @@ class Stripe {
650663
}
651664

652665
/// Initializes the customer sheet with the provided [parameters].
653-
Future<CustomerSheetResult?> initCustomerSheet(
654-
{required CustomerSheetInitParams customerSheetInitParams}) async {
666+
Future<CustomerSheetResult?> initCustomerSheet({
667+
required CustomerSheetInitParams customerSheetInitParams,
668+
}) async {
655669
await _awaitForSettings();
656670
return _platform.initCustomerSheet(customerSheetInitParams);
657671
}
@@ -666,7 +680,7 @@ class Stripe {
666680

667681
/// Retrieve the customer sheet payment option selection.
668682
Future<CustomerSheetResult?>
669-
retrieveCustomerSheetPaymentOptionSelection() async {
683+
retrieveCustomerSheetPaymentOptionSelection() async {
670684
await _awaitForSettings();
671685

672686
return _platform.retrieveCustomerSheetPaymentOptionSelection();
@@ -711,13 +725,14 @@ class Stripe {
711725
}
712726
}
713727

714-
Future<void> _initialise(
715-
{required String publishableKey,
716-
String? stripeAccountId,
717-
ThreeDSecureConfigurationParams? threeDSecureParams,
718-
String? merchantIdentifier,
719-
String? urlScheme,
720-
bool? setReturnUrlSchemeOnAndroid}) async {
728+
Future<void> _initialise({
729+
required String publishableKey,
730+
String? stripeAccountId,
731+
ThreeDSecureConfigurationParams? threeDSecureParams,
732+
String? merchantIdentifier,
733+
String? urlScheme,
734+
bool? setReturnUrlSchemeOnAndroid,
735+
}) async {
721736
_needsSettings = false;
722737
await _platform.initialise(
723738
publishableKey: publishableKey,

0 commit comments

Comments
 (0)