GithubHelp home page GithubHelp logo

radianttap / allsecure-exchange-tokenization-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allsecure-pay/exchange-tokenization-ios

0.0 1.0 0.0 25 KB

AllSecure Exchange SDK for card tokenization on iOS

License: MIT License

Objective-C 100.00%

allsecure-exchange-tokenization-ios's Introduction

allsecure-exchange-tokenization-ios

This SDK enables you to tokenize card data natively from your iOS application to our PCI-certified servers.

Usage

Build a CardData object with card number ("pan"), CVV/CVC code ("cvv"), card holder, exipiration month and year. Instantiate the TokenizationApi class with your public integration key (and optionally hostname, if different than production environment) and call tokenizeCardData on that.

#import <AsxTokenizationSdk.h>

...


// Preprate cardData
CardData *cardData = [[CardData alloc] init];
cardData.pan = @"CARD NUMBER";
cardData.cvv = @"CVV";
cardData.cardHolder = @"CARD HOLDER";
cardData.expirationMonth = [NSNumber numberWithInt:4];
cardData.expirationYear = [NSNumber numberWithInt:2025];

// Initialize API object
TokenizationApi *api = [[TokenizationApi alloc] initWithPublicIntegrationKey:@"PUBLIC_INTEGRATION_KEY"];

// Tokenize cardData
[api tokenizeCardData:cardData onComplete:^(Token *token) {
	// Tokenization successful
    NSLog(@"Success, token is: %@ ; fingerprint: %@", 
		token.token, 
		token.fingerprint);
    
} onError:^(NSError *error) {
	// Errors occurred
    NSLog(@"Error occurred: Code %d", error.code);

    [error.userInfo enumerateKeysAndObjectsUsingBlock:^(NSErrorUserInfoKey  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop) {
        NSLog(@"Field %@, Message: %@", key, obj);
    }];

}];

Development

Requirements

  • iOS 9.0 or higher
  • Xcode 8.0 or higher (to build source)

Dependencies

  • none

License

LICENSE

Changelog

CHANGELOG.md

allsecure-exchange-tokenization-ios's People

Contributors

allsecure-pay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.