diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ff9cd90b23..46e92b2e41e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,13 @@ ## XX.XX.XX - 20XX-XX-XX * [ADDED][8466](https://github.com/stripe/stripe-android/pull/8466) Added support for [external payment methods](https://docs.stripe.com/payments/external-payment-methods?platform=android). -## 20.43.0 - 2024-05-13 - ### Financial Connections * [Changed][8377](https://github.com/stripe/stripe-android/pull/8377) The `FinancialConnectionsEvent.Name.CONSENT_ACQUIRED` event is now emitted when the consent has been acquired _and_ successfully confirmed with the Stripe backend. Previously, the event was emitted before the confirmation, making it possible to receive multiple `CONSENT_ACQUIRED` events in a single session. ### PaymentSheet * [ADDED][8430](https://github.com/stripe/stripe-android/pull/8430) Added support for using `Maestro` cards with `Google Pay` * [ADDED][8433](https://github.com/stripe/stripe-android/pull/8433) Added support for Multibanco to PaymentSheet. +* [CHANGED][8340](https://github.com/stripe/stripe-android/pull/8480) Recreate PaymentSheet/FlowController in rememberPaymentSheet functions when an input callback changes. ### Payments * [ADDED][8433](https://github.com/stripe/stripe-android/pull/8433) Added support for Multibanco to API bindings. diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/FlowControllerCompose.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/FlowControllerCompose.kt index aa97bdbb52e..cb2ba317443 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/FlowControllerCompose.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/FlowControllerCompose.kt @@ -108,7 +108,7 @@ private fun internalRememberPaymentSheetFlowController( "PaymentSheet.FlowController must be created in the context of an Activity" } - return remember { + return remember(paymentOptionCallback, paymentResultCallback) { FlowControllerFactory( viewModelStoreOwner = viewModelStoreOwner, lifecycleOwner = lifecycleOwner, diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/PaymentSheetCompose.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/PaymentSheetCompose.kt index fed6375b05a..a111ea28273 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/PaymentSheetCompose.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/PaymentSheetCompose.kt @@ -36,7 +36,7 @@ fun rememberPaymentSheet( "PaymentSheet must be created in the context of an Activity" } - return remember { + return remember(paymentResultCallback) { val launcher = DefaultPaymentSheetLauncher( activityResultLauncher = activityResultLauncher, activity = activity,