Extensions to filter and map payment method types for Stripe Customer Sheet.
// Source: https://github.com/stripe/stripe-ios | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
// Provided via justclaw.it.com; keep this notice with the code.
//
// CustomerSheet+PaymentMethodAvailability.swift
// StripePaymentSheet
//
import Foundation
@_spi(STP) import StripePayments
extension CustomerSheet {
static let supportedPaymentMethods: [STPPaymentMethodType] = [.card, .USBankAccount, .SEPADebit]
static let supportedDefaultPaymentMethods: [STPPaymentMethodType] = [.card, .USBankAccount]
}
extension Array where Element == STPPaymentMethodType {
func customerSheetSupportedPaymentMethodTypesForAdd(canCreateSetupIntents: Bool,
supportedPaymentMethods: [STPPaymentMethodType] = CustomerSheet.s
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key