Last active
August 29, 2015 14:20
-
-
Save matiasgualino/115ca81ce4a125126a16 to your computer and use it in GitHub Desktop.
MercadoPago SDK iOS for Objective-C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MercadoPagoSDK/MercadoPagoSDK-Swift.h" | |
MercadoPago *mp = [[MercadoPago alloc] initWithPublicKey:@"444a9ef5-8a6b-429f-abdf-587639155d88"]; | |
Identification *identification = [[Identification alloc] init]; | |
identification.type = @"DNI"; | |
identification.number = @"12345678"; | |
Cardholder *cardholder = [[Cardholder alloc] init]; | |
cardholder.identification = identification; | |
cardholder.name = @"APRO"; | |
CardToken *cardToken = [[CardToken alloc] initWithCardNumber:@"4170068810108020" expirationMonth:10 expirationYear:15 securityCode:@"123" cardholderName:@"APRO" docType:@"DNI" docNumber:@"12345678"]; | |
[mp createNewCardToken:cardToken success: ^(Token *t) { | |
NSLog(@"TOKEN %@", t._id); | |
} failure: ^(NSError *e) { | |
NSLog(@"ERROR"); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment