EMCapService

Objective-C


@interface EMCapService : NSObject

Swift

class EMCapService : NSObject

This service is used to create OTPs based on the Mastercard’s Chip Authentication Program (CAP) specification. In this service, a CAP Token is equivalent to an EMV smartcard while a CAP device is an equivalent to a card reader.

Since

4.0
  • Designated constructor. Returns the EMCapService object created using the EMOtpModule

    Since

    4.0

    Declaration

    Objective-C

    + (instancetype)serviceWithModule:(EMOtpModule *)module;

    Swift

    convenience init!(module: EMOtpModule!)

    Parameters

    module

    an instance of EMOtpModule

    Return Value

    EMCapService module instance.

  • Returns Factory for creating CAP settings and CAP devices.

    Since

    4.0

    Declaration

    Objective-C

    - (EMCapFactory *)capFactory;

    Swift

    func capFactory() -> EMCapFactory!

    Return Value

    EMCapFactory object.

  • Returns object which confirms to EMCapTokenManager protocol for CAP tokens. Note an error could return if database file is not decrypted in time, please try again.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMCapTokenManager>)tokenManager:(NSError **)error;

    Swift

    func tokenManager() throws -> any EMCapTokenManager

    Parameters

    error

    if error occurs, relevant information shall be stored here.

    Return Value

    object which confirms to EMCapTokenManager protocol.