OPPIkanoPrivateLabelVAPaymentParams

@objc
public final class OPPIkanoPrivateLabelVAPaymentParams : OPPPaymentParams, NSCopying

Class to encapsulate all necessary transaction parameters for performing an Ikano private label transaction (as virtual account).

  • The account number.

    Declaration

    Swift

    @objc
    public private(set) var accountNumber: String { get }
  • The expiration month of the account in the format MM.

    Declaration

    Swift

    @objc
    public private(set) var expiryMonth: String { get }
  • The expiration year of the account in the format YYYY.

    Declaration

    Swift

    @objc
    public private(set) var expiryYear: String { get }
  • The verification code of the account.

    Declaration

    Swift

    @objc
    public private(set) var accountVerification: String? { get }
  • Creates an object representing an Ikano private label transaction (as virtual account).

    Throws

    The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) and NSLocalizedDescription to identify the reason of failure.

    Declaration

    Swift

    @objc
    public init(checkoutID: String,
                accountNumber: String,
                expiryMonth: String,
                expiryYear: String,
                accountVerification: String?) throws

    Parameters

    checkoutID

    The checkout ID of the transaction.

    accountNumber

    The account number.

    expiryMonth

    The expiration month of the account. It is expected in the format MM.

    expiryYear

    The expiration year of the account. It is expected in the format YYYY.

    accountVerification

    The verification code of the account.

    Return Value

    An object representing an Ikano private label transaction (as virtual account).

  • Creates an object representing an Ikano private label transaction (as virtual account).

    Throws

    The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) and NSLocalizedDescription to identify the reason of failure.

    Declaration

    Swift

    @objc
    public static func ikanoPrivateLabelVAPaymentParams(checkoutID: String,
                                                        accountNumber: String,
                                                        expiryMonth: String,
                                                        expiryYear: String,
                                                        accountVerification: String?) throws -> OPPIkanoPrivateLabelVAPaymentParams

    Parameters

    checkoutID

    The checkout ID of the transaction.

    accountNumber

    The account number.

    expiryMonth

    The expiration month of the account. It is expected in the format MM.

    expiryYear

    The expiration year of the account. It is expected in the format YYYY.

    accountVerification

    The verification code of the account.

    Return Value

    an object representing an Ikano private label transaction (as virtual account).

  • Checks if account number is valid (card number validation used).

    Declaration

    Swift

    static func isAccountNumberValid(_ accountNumber: String) -> Bool

    Parameters

    accountNumber

    The account number.

    Return Value

    true if account number is valid, false if it doesn’t.

  • Checks if expiration month is valid, MM format expected.

    Declaration

    Swift

    static func isExpiryMonthValid(_ expiryMonth: String) -> Bool

    Parameters

    expiryMonth

    The expiration month of the account.

    Return Value

    true if expiration month is valid, false if it doesn’t.

  • Checks if expiration year is valid, YYYY format expected.

    Declaration

    Swift

    static func isExpiryYearValid(_ expiryYear: String) -> Bool

    Parameters

    expiryYear

    The expiration year of the account.

    Return Value

    true if expiration year is valid, false if it doesn’t.

  • Checks if account is expired, expiration month and year should represent some date in the future.

    Declaration

    Swift

    static func isAccountExpired(withExpiryMonth expiryMonth: String,
                                 andYear expiryYear: String) -> Bool

    Parameters

    expiryMonth

    The expiration month of the account.

    expiryYear

    The expiration year of the account.

    Return Value

    true if the account is expired. false if the account is not expired yet.

  • Checks if verification code in valid, up to 5 digits expected.

    Declaration

    Swift

    static func isAccountVerificationValid(_ accountVerification: String) -> Bool

    Parameters

    accountVerification

    The verification code of the account.

    Return Value

    true if the verification code is valid, false if it doesn’t.