JudoPayView

public class JudoPayView: UIView

JudoPayView - the main view in the transaction journey

  • The content view of the JudoPayView

    Declaration

    Swift

    public let contentView: UIScrollView =
  • Designated initializer

    Declaration

    Swift

    public init(type: TransactionType, currentTheme: Theme, cardDetails: CardDetails? = nil, isTokenPayment: Bool = false)

    Parameters

    type

    The transactionType of this transaction

    cardDetails

    Card details information if they have been passed

    Return Value

    a JudoPayView object

  • Required initializer for the JudoPayView that will fail

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    A Decoder

    Return Value

    a fatal error will be thrown as this class should not be retrieved by decoding

  • This method is intended to toggle the start date and issue number fields visibility when a Card has been identified.

    • Discussion: Maestro cards need a start date or an issue number to be entered for making any transaction

    Declaration

    Swift

    public func toggleStartDateVisibility(isVisible: Bool)

    Parameters

    isVisible

    Whether start date and issue number fields should be visible

  • This method toggles the visibility of address fields (billing country and post code).

    • Discussion: If AVS is necessary, this should be activated. AVS only needs Postcode to verify

    Declaration

    Swift

    public func toggleAVSVisibility(isVisible: Bool, completion: (() -> ())? = nil)

    Parameters

    isVisible

    Whether post code and billing country fields should be visible

    completion

    Block that is called when animation was finished

  • Delegate method that is triggered when the CardInputField encountered an error

    Declaration

    Swift

    public func cardInput(input: CardInputField, error: JudoError)

    Parameters

    input

    The input field calling the delegate method

    error

    The error that occured

  • Delegate method that is triggered when the CardInputField did find a valid number

    Declaration

    Swift

    public func cardInput(input: CardInputField, didFindValidNumber cardNumberString: String)

    Parameters

    input

    The input field calling the delegate method

    cardNumberString

    The card number that has been entered as a String

  • Delegate method that is triggered when the CardInputField detected a network

    Declaration

    Swift

    public func cardInput(input: CardInputField, didDetectNetwork network: CardNetwork)

    Parameters

    input

    The input field calling the delegate method

    network

    The network that has been identified

  • Delegate method that is triggered when the date input field has encountered an error

    Declaration

    Swift

    public func dateInput(input: DateInputField, error: JudoError)

    Parameters

    input

    The input field calling the delegate method

    error

    The error that occured

  • Delegate method that is triggered when the date input field has found a valid date

    Declaration

    Swift

    public func dateInput(input: DateInputField, didFindValidDate date: String)

    Parameters

    input

    The input field calling the delegate method

    date

    The valid date that has been entered

  • Delegate method that is triggered when the issueNumberInputField entered a code

    Declaration

    Swift

    public func issueNumberInputDidEnterCode(inputField: IssueNumberInputField, issueNumber: String)

    Parameters

    input

    The issueNumberInputField calling the delegate method

    issueNumber

    The issue number that has been entered as a String

  • Delegate method that is triggered when the billing country input field selected a billing country

    Declaration

    Swift

    public func billingCountryInputDidEnter(input: BillingCountryInputField, billingCountry: BillingCountry)

    Parameters

    input

    The input field calling the delegate method

    billingCountry

    The billing country that has been selected

  • Delegate method that is triggered when the post code input field encountered an error

    Declaration

    Swift

    public func postCodeInputField(input: PostCodeInputField, didEnterInvalidPostCodeWithError error: JudoError)

    Parameters

    input

    The input field calling the delegate method

    error

    The encountered error

  • Delegate method that is triggered when the judoPayInputField was validated

    Declaration

    Swift

    public func judoPayInput(input: JudoPayInputField, isValid: Bool)

    Parameters

    input

    The input field calling the delegate method

    isValid

    A boolean that indicates whether the input is valid or invalid

  • Delegate method that is called whenever any input field has been manipulated

    Declaration

    Swift

    public func judoPayInputDidChangeText(input: JudoPayInputField)

    Parameters

    input

    The input field calling the delegate method

  • helper method to show an alert message on the hint label and take care of the security message animation if necessary

    Declaration

    Swift

    public func showAlertOnHintLabel(message: String)

    Parameters

    message

    the message that needs to be displayed

  • helper method to hide an alert message on the hint label if visible

    Declaration

    Swift

    public func hideAlertOnHintLabel()