diff --git a/CHANGELOG.md b/CHANGELOG.md index 445e912de82..989a367dbd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## 21.0.1 - 2024-11-11 ### PaymentSheet +- [ADDED][9635](https://github.com/stripe/stripe-android/pull/9635) Instant Bank Payments are now available when using deferred intents. - [FIXED][9571](https://github.com/stripe/stripe-android/pull/9571) Fixed country prefix not being added when adding a payment method when collecting phone numbers with `BillingDetailsCollectionConfiguration`. - [FIXED][9576](https://github.com/stripe/stripe-android/pull/9576) Fixed minimum and maximum account number length for `Au Becs Debit` LPM. Customers can now provide account numbers with a length of 4 to 9 digits. @@ -15,7 +16,7 @@ ## 21.0.0 - 2024-11-04 ### PaymentSheet -- [CHANGED] [9498](https://github.com/stripe/stripe-android/pull/9498) The default value of `PaymentSheet.Configuration.Builder.paymentMethodLayout` has changed from Horizontal to Automatic. +- [CHANGED][9498](https://github.com/stripe/stripe-android/pull/9498) The default value of `PaymentSheet.Configuration.Builder.paymentMethodLayout` has changed from Horizontal to Automatic. ### Basic Integration * [REMOVED][9501](https://github.com/stripe/stripe-android/pull/9501) Basic Integration has been removed. [Please use Mobile Payment Element instead](https://docs.stripe.com/payments/mobile/migrating-to-mobile-payment-element-from-basic-integration). @@ -30,7 +31,7 @@ Dependencies updated in [9512](https://github.com/stripe/stripe-android/pull/951 ## 20.53.0 - 2024-10-21 ### PaymentSheet -* [ADDED] [9429](https://github.com/stripe/stripe-android/pull/9429) `PaymentSheet.PaymentMethodLayout` is now generally available. Configure the layout of payment methods in the sheet using `PaymentSheet.Configuration.Builder.paymentMethodLayout` to display them either horizontally, vertically, or let Stripe optimize the layout automatically. +* [ADDED][9429](https://github.com/stripe/stripe-android/pull/9429) `PaymentSheet.PaymentMethodLayout` is now generally available. Configure the layout of payment methods in the sheet using `PaymentSheet.Configuration.Builder.paymentMethodLayout` to display them either horizontally, vertically, or let Stripe optimize the layout automatically. Dependencies updated in [9345](https://github.com/stripe/stripe-android/pull/9345) and [9469](https://github.com/stripe/stripe-android/pull/9469) and [9473](https://github.com/stripe/stripe-android/pull/9473): * Bumped Accompanist from 0.32.0 to 0.34.0. diff --git a/paymentsheet-example/src/main/java/com/stripe/android/paymentsheet/example/playground/settings/PlaygroundSettings.kt b/paymentsheet-example/src/main/java/com/stripe/android/paymentsheet/example/playground/settings/PlaygroundSettings.kt index 2d6010d5de9..b4dfe3f129a 100644 --- a/paymentsheet-example/src/main/java/com/stripe/android/paymentsheet/example/playground/settings/PlaygroundSettings.kt +++ b/paymentsheet-example/src/main/java/com/stripe/android/paymentsheet/example/playground/settings/PlaygroundSettings.kt @@ -448,7 +448,6 @@ internal class PlaygroundSettings private constructor( LayoutSettingsDefinition, CardBrandAcceptanceSettingsDefinition, FeatureFlagSettingsDefinition(FeatureFlags.useNewUpdateCardScreen), - FeatureFlagSettingsDefinition(FeatureFlags.instantDebitsDeferredIntent), ) private val nonUiSettingDefinitions: List> = listOf( diff --git a/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirement.kt b/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirement.kt index c100fa08ff1..e1ad93ca99d 100644 --- a/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirement.kt +++ b/paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirement.kt @@ -1,6 +1,5 @@ package com.stripe.android.lpmfoundations.paymentmethod -import com.stripe.android.core.utils.FeatureFlags import com.stripe.android.model.LinkMode import com.stripe.android.model.PaymentIntent import com.stripe.android.model.PaymentMethod.Type.USBankAccount @@ -81,9 +80,7 @@ private val PaymentMethodMetadata.supportsMobileInstantDebitsFlow: Boolean val paymentMethodTypes = stripeIntent.paymentMethodTypes val noUsBankAccount = USBankAccount.code !in paymentMethodTypes val supportsBankAccounts = "bank_account" in stripeIntent.linkFundingSources - val isDeferred = stripeIntent.clientSecret == null - return noUsBankAccount && supportsBankAccounts && canShowBankForm && - (!isDeferred || FeatureFlags.instantDebitsDeferredIntent.isEnabled) + return noUsBankAccount && supportsBankAccounts && canShowBankForm } private val PaymentMethodMetadata.canShowBankForm: Boolean diff --git a/paymentsheet/src/test/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirementTest.kt b/paymentsheet/src/test/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirementTest.kt index 08d3858258e..bc8abaa630a 100644 --- a/paymentsheet/src/test/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirementTest.kt +++ b/paymentsheet/src/test/java/com/stripe/android/lpmfoundations/paymentmethod/AddPaymentMethodRequirementTest.kt @@ -174,17 +174,6 @@ internal class AddPaymentMethodRequirementTest { assertThat(InstantDebits.isMetBy(metadata)).isTrue() } - @Test - fun testInstantDebitsReturnsFalseIfDeferredIntent() { - val metadata = PaymentMethodMetadataFactory.create( - stripeIntent = createValidInstantDebitsPaymentIntent().copy( - clientSecret = null, - ), - ) - - assertThat(InstantDebits.isMetBy(metadata)).isFalse() - } - @Test fun testInstantDebitsReturnsFalseIfShowingUsBankAccount() { val metadata = PaymentMethodMetadataFactory.create( diff --git a/stripe-core/src/main/java/com/stripe/android/core/utils/FeatureFlags.kt b/stripe-core/src/main/java/com/stripe/android/core/utils/FeatureFlags.kt index 74a588609eb..86bf72b5c0e 100644 --- a/stripe-core/src/main/java/com/stripe/android/core/utils/FeatureFlags.kt +++ b/stripe-core/src/main/java/com/stripe/android/core/utils/FeatureFlags.kt @@ -7,7 +7,6 @@ import com.stripe.android.core.BuildConfig object FeatureFlags { // Add any feature flags here val nativeLinkEnabled = FeatureFlag("Native Link") - val instantDebitsDeferredIntent = FeatureFlag("IBP Deferred") val useNewUpdateCardScreen = FeatureFlag("Enable new update card screen") }