Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for BankAccount payment method in Link #9922

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ internal fun StripeIntent.supportedPaymentMethodTypes(linkAccount: LinkAccount)

private val supportedPaymentMethodTypes = setOf(
ConsumerPaymentDetails.Card.TYPE,
ConsumerPaymentDetails.BankAccount.TYPE,
ConsumerPaymentDetails.Passthrough.TYPE
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class StripeIntentKtxTest {
fun `When test mode and test account then all funding sources are enabled`() {
val supportedTypes = stripeIntent(liveMode = false)
.supportedPaymentMethodTypes(linkAccount("[email protected]"))
assertThat(supportedTypes).containsExactly("card", "bank_account")
assertThat(supportedTypes).containsExactly("card")
}

@Test
Expand All @@ -39,14 +39,14 @@ class StripeIntentKtxTest {
}

@Test
fun `When funding sources contains invalid items then invalid items are ignored`() {
val supportedTypes = stripeIntent(fundingSources = listOf("invalid", "invalid2", "bank_account"))
fun `When funding sources contains invalid items, then return only valid items`() {
val supportedTypes = stripeIntent(fundingSources = listOf("invalid", "invalid2", "card"))
.supportedPaymentMethodTypes(linkAccount("[email protected]"))
assertThat(supportedTypes).containsExactly("bank_account")
assertThat(supportedTypes).containsExactly("card")
}

@Test
fun `When funding sources contains only invalid items then default to card`() {
fun `When funding sources contains only invalid items, then return card`() {
val supportedTypes = stripeIntent(fundingSources = listOf("invalid", "invalid2", "bank_acc0unt"))
.supportedPaymentMethodTypes(linkAccount("[email protected]"))
assertThat(supportedTypes).containsExactly("card")
Expand Down
Loading