MCD iOS SDK

Provides API to retrieve additional information about the card from 3rd party vendor’s system.

Installation

It is recommended to use Xcode to develop and build the project.

Framework

  1. Download mcd---.zip.

  2. Unzip the archive. Archive contains iOS XCFramework – MeaCardData.xcframework.

  3. Add MeaCardData.xcframework to Frameworks, Libraries and Embedded Content section of General settings in iOS project target. Set Embed & Sign.

Implementation guide

Before starting implementation you should have finished installation of the MCD SDK.

Overview

MeaCardData is the main interface for interaction with MCD SDK.

Get Card data

SDK provides getCardData method to fetch PAN and CVV values of the card.

The following input parameters are required to retrieve the card data:

  • cardId – Card ID (For the GPS customers this is Public Token Id) as presented in 3rd party vendor’s system.
  • secret – Time-based OTP value generated on backend side.
import MeaCardData

...

let cardId: String = "<value"
let secret: String = "<value>"

MeaCardData.getCardData(cardId, secret: secret) { (cardData, error) in

    if (error != nil) {
        print(String(format: "Card data request failed: %@", error!.localizedDescription))
    }
    else {
        let pan = cardData!.pan
        let cvv = cardData!.cvv

        print(String(format: "Card data fetched successfully, pan: %@, cvv: %@", pan, cvv))
    }
}
Swift
#import <MeaCardData/MeaCardData.h>

...

NSString *cardId = @"<value>";
NSString *secret = @"<value>";

[MeaCardData getCardData:cardId secret:secret completionHandler:^(McdCardData *_Nullable cardData, NSError *_Nullable error) {
        if (error) {
            NSLog(@"Card data request failed: %@", [error localizedDescription]);
        }
        else {
            NSString *pan = cardData.pan;
            NSString *cvv = cardData.cvv;

            NSLog(@"Card data fetched successfully, pan: %@, cvv: %@", pan, cvv);
        }
}];
Objective-C

Debugging

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

Changelog

1.0.0

2020-04-28

MODIFIED Improved response parsing.

0.1.2

2020-03-18

MODIFIED Built with iOS SDK 13.2.

0.1.0

2019-10-23

First version of MeaWallet MCD SDK for iOS.

On this page