Skip to content

Latest commit

 

History

History
49 lines (41 loc) · 1.02 KB

README.md

File metadata and controls

49 lines (41 loc) · 1.02 KB

mango-ios

Mango SDK for iOS

#Installation We use CocoaPods:

pod 'mango-ios', :git => 'https://github.com/mango/mango-ios.git'

#How to use ##Setup

#import <mango-ios/Mango.h>

...

[Mango sharedInstance].publicAPIKey = @"some_public_api_key";

##Tokenize credit card

[mango createTokenWithNumber:@"4507990000000010"
                        type:@"visa"
                  holdername:@"Test Visa"
             expirationMonth:10
              expirationYear:2015
                         CCV:@"023"
             completionBlock:^(NSError *error, NSDictionary *data) {
                if (error) {
                  // Handle error with grace 
                } else {
                  // Success! Get your credit card token from data
                }
             }];

##Create CCV

[mango createCCV:@"123" completionBlock:^(NSError *error, NSDictionary *data) {
  if (error) {
    // Handle error with grace 
  } else {
    // Success! Get your credit card token from data
  }
}];