Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

aol/obi_android_tokenization_stech_lib

Repository files navigation

ARCHIVED

HOW TO USE

  1. Add compile 'com.aol.obi:android-tokenization-stech-lib-lib:1.0'

under dependencies of app level build.gradle file

  1. Sync project

  2. Add permission request for ACCESS_FINE_LOCATION for Android API >= 23

  3. Use the following code

a) to validate, encrypt and tokenize a credit card number and cvv using library:

 Tokenize tokenize = new Tokenize(context);
 String encryptedCreditCard = tokenize.creditCard(cardNumber, cardCvv, domain, merchantId);

b) to encrypt and tokenize a bank account number using Kount:

 Tokenize tokenize = new Tokenize(context);
 String encryptedBankAccount = tokenize.bankAccount(accountNumber, domain, merchantId);

c) to only encrypt a credit card number:

 String encryptedCard = Encrypt.encrypt(cardNumber, cardCvv, domain);

d) to only encrypt a bank account number:

 String encryptedBankAccount = Encrypt.encrypt(accountNumber, "", domain);

e) to validate a credit card

 boolean isValid = Validator.validate(cardNumber);

f) Exceptions:

 OBIValidationException -> Throws this exception when invalid card passed. User need to correct the input
 OBISystemException -> Throws this exception incase of unknown system errors, user can retry.

Notes: All parameters are Strings except merchantId, which is int. Parameter domain shows the environment of the library usage and can be "DEV" or "PROD" or "QA". Any other value of domain will be considered as "QA".

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages