ApplePayStyle

public struct ApplePayStyle

Contains the styling options for Apple Pay components.

  • Style of the payment button. When nil, it’s set to automatic based on Dark or Light Mode.

    Declaration

    Swift

    public var paymentButtonStyle: PKPaymentButtonStyle?
  • Type of the Apple Pay payment button. Default is .plain

    Declaration

    Swift

    public var paymentButtonType: PKPaymentButtonType
  • Corner radius for the payment button. iOS 12 or above. Defaults to 4 points.

    Declaration

    Swift

    public var cornerRadius: CGFloat
  • Background color for the Apple Pay component.

    Declaration

    Swift

    public var backgroundColor: UIColor
  • Stying for the label that contains the formatted amount text.

    Declaration

    Swift

    public var hintLabel: TextStyle
  • Initializes an Apple Pay style instance with default values.

    Declaration

    Swift

    public init(paymentButtonStyle: PKPaymentButtonStyle? = nil,
                paymentButtonType: PKPaymentButtonType = .plain,
                cornerRadius: CGFloat = 4,
                backgroundColor: UIColor = UIColor.Adyen.componentBackground,
                hintLabel: TextStyle = TextStyle(font: .preferredFont(forTextStyle: .footnote),
                                                 color: UIColor.Adyen.componentSecondaryLabel))

    Parameters

    paymentButtonStyle

    Style of the payment button.

    paymentButtonType

    Type of the Apple Pay payment button. Default is .plain

    cornerRadius

    Corner radius for the payment button. iOS 12 or above. Defaults to 4 points.

    backgroundColor

    Background color for the Apple Pay component.

    hintLabel

    Stying for the label that contains the formatted amount text.