Skip to main content

Implementation Guide

Before starting implementation you should have finished Installation of the MCD SDK. MTC SDK provides functionality to find all the cardholder tokens, and token control. MTC SDK methods support asynchronous invocation only.

Main Interface

MeaTokenControl is the main interface of MTC SDK.

Card Data Parameters

let cardId = "<value>"
let cardSecret = "<value>"

let cardParams = MtcCardDataParameters.init(cardId: cardId, cardSecret: cardSecret)

Get Tokens

let cardParams = "<value>"

let cardParams = MeaTokenControl.getTokens(mppCardParameters) { (data, error) in
...
}

Suspend Token

let cardParams = "<value>"

let cardParams = MeaTokenControl.suspendToken(tokenUniqueReference) { (data, error) in
...
}

Unsuspend Token

let cardParams = "<value>"

let cardParams = MeaTokenControl.unsuspendToken(tokenUniqueReference) { (data, error) in
...
}

Delete Token

let cardParams = "<value>"

let cardParams = MeaTokenControl.deleteToken(tokenUniqueReference) { (data, error) in
...
}

Get Token Status History

let cardParams = "<value>"

let cardParams = MeaTokenControl.getTokenStatusHistory(tokenUniqueReference) { (data, error) in
...
}

Debugging

Use setDebugLoggingEnabled method to enable/disable logging to console. Use versionName and versionCode methods to check the version of the SDK, when necessary.

import MeaTokenControl

...

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

MeaTokenControl.setDebugLoggingEnabled(true)

print(String(format: "SDK version: %@, code: %@", MeaTokenControl.versionName(), MeaTokenControl.versionCode()))

...

return true
}