Skip to content

Commit

Permalink
Remove instantDebitsDeferredIntent feature flag (#9635)
Browse files Browse the repository at this point in the history
* Remove `instantDebitsDeferredIntent` feature flag

* Add release note

* Remove outdated test
  • Loading branch information
tillh-stripe authored Nov 15, 2024
1 parent fbdc465 commit bb348ae
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 19 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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).
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ internal class PlaygroundSettings private constructor(
LayoutSettingsDefinition,
CardBrandAcceptanceSettingsDefinition,
FeatureFlagSettingsDefinition(FeatureFlags.useNewUpdateCardScreen),
FeatureFlagSettingsDefinition(FeatureFlags.instantDebitsDeferredIntent),
)

private val nonUiSettingDefinitions: List<PlaygroundSettingDefinition<*>> = listOf(
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit bb348ae

Please sign in to comment.