From 822f04c801eef4a8554714ab41ec517504228275 Mon Sep 17 00:00:00 2001 From: Tyler Clawson Date: Tue, 8 Oct 2024 17:04:31 -0400 Subject: [PATCH] Update stripe-android to 20.52.0 --- CHANGELOG.md | 7 +++++++ android/gradle.properties | 2 +- .../customersheet/CustomerSheetFragment.kt | 6 +++--- .../customersheet/ReactNativeCustomerAdapter.kt | 2 -- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f52aad42..ee076dd3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +***Features*** +- Adds support for CustomerSession in private beta [1744](https://github.com/stripe/stripe-react-native/pull/1744) + +***Fixes*** +* Updated `stripe-ios` to 23.30.\* +* Updated `stripe-android` to 20.52.\* + ## 0.38.6 - 2024-09-04 **Fixes** diff --git a/android/gradle.properties b/android/gradle.properties index 80bb1a350..3f1ecff88 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.49.+ +StripeSdk_stripeVersion=20.52.+ diff --git a/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt b/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt index 0e1fdf743..9fe2b4241 100644 --- a/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +++ b/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt @@ -20,7 +20,6 @@ import com.stripe.android.customersheet.CustomerAdapter import com.stripe.android.customersheet.CustomerEphemeralKey import com.stripe.android.customersheet.CustomerSheet import com.stripe.android.customersheet.CustomerSheetResult -import com.stripe.android.customersheet.ExperimentalCustomerSheetApi import com.stripe.android.customersheet.PaymentOptionSelection import com.stripe.android.model.PaymentMethod import com.stripe.android.paymentsheet.* @@ -29,7 +28,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch -@OptIn(ExperimentalCustomerSheetApi::class, ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi::class) +@OptIn(ExperimentalAllowsRemovalOfLastSavedPaymentMethodApi::class) class CustomerSheetFragment : Fragment() { private var customerSheet: CustomerSheet? = null internal var customerAdapter: ReactNativeCustomerAdapter? = null @@ -111,11 +110,12 @@ class CustomerSheetFragment : Fragment() { customerSheet = CustomerSheet.create( fragment = this, - configuration = configuration.build(), customerAdapter = customerAdapter, callback = ::handleResult ) + customerSheet?.configure(configuration.build()) + initPromise.resolve(WritableNativeMap()) } diff --git a/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt b/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt index 46260b6be..0ae53d18b 100644 --- a/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +++ b/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt @@ -7,11 +7,9 @@ import com.facebook.react.bridge.ReadableMap import com.facebook.react.bridge.WritableMap import com.reactnativestripesdk.StripeSdkModule import com.stripe.android.customersheet.CustomerAdapter -import com.stripe.android.customersheet.ExperimentalCustomerSheetApi import com.stripe.android.model.PaymentMethod import kotlinx.coroutines.CompletableDeferred -@OptIn(ExperimentalCustomerSheetApi::class) class ReactNativeCustomerAdapter ( private val context: ReactApplicationContext, private val adapter: CustomerAdapter,