From add789e8b4fe834e6ac419f1324004d30456ca66 Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Mon, 23 Oct 2023 12:45:53 -1000 Subject: [PATCH 1/4] chore: upgrade dependencies --- android/build.gradle | 9 +- android/gradle.properties | 2 +- .../PaymentLauncherFragment.kt | 1 + .../com/reactnativestripesdk/utils/Mappers.kt | 6 ++ example/ios/Podfile.lock | 98 +++++++++---------- stripe-react-native.podspec | 2 +- 6 files changed, 65 insertions(+), 53 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 62a9c73f3..2b32f9793 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -135,8 +135,13 @@ dependencies { implementation 'com.github.bumptech.glide:glide:4.12.0' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1" - implementation "com.stripe:stripe-android:$stripe_version" - implementation "com.stripe:financial-connections:$stripe_version" + implementation("com.stripe:stripe-android:$stripe_version") { + exclude group: 'androidx.emoji2', module: 'emoji2' + } + implementation ("com.stripe:financial-connections:$stripe_version") { + exclude group: 'androidx.emoji2', module: 'emoji2' + } + implementation('androidx.emoji2:emoji2:1.3.0').force // Avoid using 1.4.0 since that requires targetSdkVersion 34 implementation 'com.google.android.material:material:1.3.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' diff --git a/android/gradle.properties b/android/gradle.properties index 4348d8aea..0a1677391 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ StripeSdk_kotlinVersion=1.8.0 # Keep StripeSdk_stripeVersion in sync with https://github.com/stripe/stripe-identity-react-native/blob/main/android/gradle.properties -StripeSdk_stripeVersion=20.31.+ +StripeSdk_stripeVersion=20.34.+ diff --git a/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt b/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt index 114d9b29e..d4926021f 100644 --- a/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +++ b/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt @@ -292,6 +292,7 @@ class PaymentLauncherFragment( StripeIntent.NextActionType.WeChatPayRedirect, StripeIntent.NextActionType.UpiAwaitNotification, StripeIntent.NextActionType.CashAppRedirect, + StripeIntent.NextActionType.SwishRedirect, null, -> false } } diff --git a/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt b/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt index 783579f80..5e763a487 100644 --- a/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +++ b/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt @@ -502,6 +502,12 @@ internal fun mapNextAction(type: NextActionType?, data: NextActionData?): Writab nextActionMap.putString("voucherURL", it.hostedVoucherUrl) } } + NextActionType.SwishRedirect -> { + (data as? NextActionData.SwishRedirect)?.let { + nextActionMap.putString("type", "swishRedirect") + nextActionMap.putString("mobileAuthUrl", it.mobileAuthUrl) + } + } } return nextActionMap } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index c194aecda..d684103bb 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -368,50 +368,50 @@ PODS: - React-Core - React-RCTImage - SocketRocket (0.6.0) - - Stripe (23.16.0): - - StripeApplePay (= 23.16.0) - - StripeCore (= 23.16.0) - - StripePayments (= 23.16.0) - - StripePaymentsUI (= 23.16.0) - - StripeUICore (= 23.16.0) + - Stripe (23.18.0): + - StripeApplePay (= 23.18.0) + - StripeCore (= 23.18.0) + - StripePayments (= 23.18.0) + - StripePaymentsUI (= 23.18.0) + - StripeUICore (= 23.18.0) - stripe-react-native (0.33.0): - React-Core - - Stripe (~> 23.16.0) - - StripeApplePay (~> 23.16.0) - - StripeFinancialConnections (~> 23.16.0) - - StripePayments (~> 23.16.0) - - StripePaymentSheet (~> 23.16.0) - - StripePaymentsUI (~> 23.16.0) + - Stripe (~> 23.18.0) + - StripeApplePay (~> 23.18.0) + - StripeFinancialConnections (~> 23.18.0) + - StripePayments (~> 23.18.0) + - StripePaymentSheet (~> 23.18.0) + - StripePaymentsUI (~> 23.18.0) - stripe-react-native/Tests (0.33.0): - React-Core - - Stripe (~> 23.16.0) - - StripeApplePay (~> 23.16.0) - - StripeFinancialConnections (~> 23.16.0) - - StripePayments (~> 23.16.0) - - StripePaymentSheet (~> 23.16.0) - - StripePaymentsUI (~> 23.16.0) - - StripeApplePay (23.16.0): - - StripeCore (= 23.16.0) - - StripeCore (23.16.0) - - StripeFinancialConnections (23.16.0): - - StripeCore (= 23.16.0) - - StripeUICore (= 23.16.0) - - StripePayments (23.16.0): - - StripeCore (= 23.16.0) - - StripePayments/Stripe3DS2 (= 23.16.0) - - StripePayments/Stripe3DS2 (23.16.0): - - StripeCore (= 23.16.0) - - StripePaymentSheet (23.16.0): - - StripeApplePay (= 23.16.0) - - StripeCore (= 23.16.0) - - StripePayments (= 23.16.0) - - StripePaymentsUI (= 23.16.0) - - StripePaymentsUI (23.16.0): - - StripeCore (= 23.16.0) - - StripePayments (= 23.16.0) - - StripeUICore (= 23.16.0) - - StripeUICore (23.16.0): - - StripeCore (= 23.16.0) + - Stripe (~> 23.18.0) + - StripeApplePay (~> 23.18.0) + - StripeFinancialConnections (~> 23.18.0) + - StripePayments (~> 23.18.0) + - StripePaymentSheet (~> 23.18.0) + - StripePaymentsUI (~> 23.18.0) + - StripeApplePay (23.18.0): + - StripeCore (= 23.18.0) + - StripeCore (23.18.0) + - StripeFinancialConnections (23.18.0): + - StripeCore (= 23.18.0) + - StripeUICore (= 23.18.0) + - StripePayments (23.18.0): + - StripeCore (= 23.18.0) + - StripePayments/Stripe3DS2 (= 23.18.0) + - StripePayments/Stripe3DS2 (23.18.0): + - StripeCore (= 23.18.0) + - StripePaymentSheet (23.18.0): + - StripeApplePay (= 23.18.0) + - StripeCore (= 23.18.0) + - StripePayments (= 23.18.0) + - StripePaymentsUI (= 23.18.0) + - StripePaymentsUI (23.18.0): + - StripeCore (= 23.18.0) + - StripePayments (= 23.18.0) + - StripeUICore (= 23.18.0) + - StripeUICore (23.18.0): + - StripeCore (= 23.18.0) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -636,15 +636,15 @@ SPEC CHECKSUMS: RNCPicker: 0bf8ef8f7800524f32d2bb2a8bcadd53eda0ecd1 RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Stripe: fcab417424a45d995aa1e62a39bc942233b61ba3 - stripe-react-native: fb59ade94b226d967c0473346985ee04a976e078 - StripeApplePay: 81de266a964b3ad02fb25e8b22fd8c235d2916a8 - StripeCore: ac141047bca25f5ae945a1cbdd00a90b0d08c616 - StripeFinancialConnections: d7a452e4bed1195d8978ee4f6c0ba2f82c89fdf4 - StripePayments: 5804cb9b02cca488042e5cf8cf57a86a5080006b - StripePaymentSheet: 06ea6bbf49be869769c46bf31be4fbc3e23b5b19 - StripePaymentsUI: 24a0349ae8c7e8c7402086703720fe06c52ddea0 - StripeUICore: ce85e040a22bf0335061d14973d37757528b3d2d + Stripe: 4092bc51f41ca1758166aef921aa0dd2f0fbc639 + stripe-react-native: 782bcf073871e678dd51a0a1bdb7b0eafae25efe + StripeApplePay: aedbcb53f5324d527a52a5888bd0eeee25b3ca36 + StripeCore: f86db23fb3f984808e6f5d3876397b953bf58a52 + StripeFinancialConnections: 0aaddb3593a7cc76b5f01eab185f16ef60798b15 + StripePayments: 050a2c5e2cc6f9492d80fddbc9bb3e7d00ddb0c8 + StripePaymentSheet: 7a1e68dacbd280bb67ff299a9f9e3337710bbcaf + StripePaymentsUI: cec7249a59f0031050cb08e1bf27cad30654d73c + StripeUICore: 1b23b5c211091c3675f1cc446df9c14f8836630a Yoga: 7a4d48cfb35dfa542151e615fa73c1a0d88caf21 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/stripe-react-native.podspec b/stripe-react-native.podspec index 82252758f..385ae50fc 100644 --- a/stripe-react-native.podspec +++ b/stripe-react-native.podspec @@ -2,7 +2,7 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) # Keep stripe_version in sync with https://github.com/stripe/stripe-identity-react-native/blob/main/stripe-identity-react-native.podspec -stripe_version = '~> 23.16.0' +stripe_version = '~> 23.18.0' Pod::Spec.new do |s| s.name = 'stripe-react-native' From 3591113cb46485c7050eff187fb42d42388d186e Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Mon, 23 Oct 2023 12:47:03 -1000 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 149386e46..acfaf3a13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - Added new `presentationStyle` options for CustomerSheet and AddressSheet. [#1515](https://github.com/stripe/stripe-react-native/pull/1515) - Support `PlatformPayButton`'s `appearance` and `borderRadius` props on Android. [#1534](https://github.com/stripe/stripe-react-native/pull/1534) +- PaymentSheet now supports Swish for PaymentIntents in private beta [#1542](https://github.com/stripe/stripe-react-native/pull/1542) +- PaymentSheet now supports saved payment method support for SEPA family payment methods [#1542](https://github.com/stripe/stripe-react-native/pull/1542) **Fixes** From 1ff9ad6d189a0dfabd114f595bb589703f6d82b7 Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Tue, 24 Oct 2023 09:10:55 -1000 Subject: [PATCH 3/4] fix e2e --- e2e-tests/paymentsheet-customFlow-decoupled.yml | 2 +- e2e-tests/paymentsheet-customFlow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e-tests/paymentsheet-customFlow-decoupled.yml b/e2e-tests/paymentsheet-customFlow-decoupled.yml index 5bcd6909c..f42dccf31 100644 --- a/e2e-tests/paymentsheet-customFlow-decoupled.yml +++ b/e2e-tests/paymentsheet-customFlow-decoupled.yml @@ -12,7 +12,7 @@ appId: ${APP_ID} visible: "TEST MODE" timeout: 150000 - tapOn: - id: "+ Add" + above: "+ Add" optional: true - tapOn: text: "Card number" diff --git a/e2e-tests/paymentsheet-customFlow.yml b/e2e-tests/paymentsheet-customFlow.yml index 8bd3d4919..f416cb3c1 100644 --- a/e2e-tests/paymentsheet-customFlow.yml +++ b/e2e-tests/paymentsheet-customFlow.yml @@ -12,7 +12,7 @@ appId: ${APP_ID} visible: "TEST MODE" timeout: 150000 - tapOn: - id: "+ Add" + above: "+ Add" optional: true - tapOn: text: "Card number" From 0a8b9f7fff7791bfe742bb8421d63d7081d2cdf5 Mon Sep 17 00:00:00 2001 From: Charlie Cruzan Date: Wed, 25 Oct 2023 08:59:23 -1000 Subject: [PATCH 4/4] fix another e2e test --- e2e-tests/paymentsheet-decoupled.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/paymentsheet-decoupled.yml b/e2e-tests/paymentsheet-decoupled.yml index b6babaef8..0b7569a13 100644 --- a/e2e-tests/paymentsheet-decoupled.yml +++ b/e2e-tests/paymentsheet-decoupled.yml @@ -8,7 +8,7 @@ appId: ${APP_ID} visible: "TEST MODE" timeout: 150000 - tapOn: - id: "+ Add" + above: "+ Add" optional: true - tapOn: text: "Card number"