Skip to content

Commit

Permalink
Optionally show US Bank account Payment method (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooj-stripe authored Apr 8, 2022
1 parent 89b8f7f commit 1b9531f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Stripe/AddPaymentMethodViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class AddPaymentMethodViewController: UIViewController {
// as an option and let the support calls decide if it's allowed
recommendedPaymentMethodTypes.append(.linkInstantDebit)
}
if ConnectionsSDKAvailability.connections() == nil {
if let index = recommendedPaymentMethodTypes.firstIndex(of: .USBankAccount) {
recommendedPaymentMethodTypes.remove(at: index)
}
}
return recommendedPaymentMethodTypes.filter {
PaymentSheet.supportsAdding(
paymentMethod: $0,
Expand Down

0 comments on commit 1b9531f

Please sign in to comment.