CardComponent
public class CardComponent: PublicKeyConsumer,
PresentableComponent,
Localizable,
LoadingComponent
A component that provides a form for card payments.
See also
Implementation guidelines-
Describes the component’s UI style.
Declaration
Swift
public let style: FormComponentStyle
-
The card payment method.
Declaration
Swift
public var paymentMethod: PaymentMethod { get }
-
The delegate for user activity on card component.
Declaration
Swift
public weak var cardComponentDelegate: CardComponentDelegate?
-
The supported card types.
Declaration
Swift
public let supportedCardTypes: [CardType]
-
Card component configuration.
Declaration
Swift
public let configuration: Configuration
-
The shopper’s information to be prefilled.
Declaration
Swift
public let shopperInformation: PrefilledShopperInformation?
-
The delegate of the component.
Declaration
Swift
public weak var delegate: PaymentComponentDelegate? { get set }
-
The payment information.
Declaration
Swift
public var payment: Payment? { get set }
-
Initializes the card component.
Declaration
Swift
public convenience init(paymentMethod: AnyCardPaymentMethod, apiContext: APIContext, configuration: Configuration = Configuration(), shopperInformation: PrefilledShopperInformation? = nil, style: FormComponentStyle = FormComponentStyle())
Parameters
paymentMethod
The card payment method.
apiContext
The API context.
configuration
The configuration of the component.
shopperInformation
The shopper’s information, optional.
style
The Component’s UI style.
-
The mode of address form of card component
See moreDeclaration
Swift
public enum AddressFormType
-
The mode of input field on Component UI
See moreDeclaration
Swift
public enum FieldVisibility
-
Card component configuration.
See moreDeclaration
Swift
public struct Configuration