Android
Note
The integration method outlined below is deprecated.
Learn more about upgrading to the Braintree SDKs.
Installation
There are a couple of ways to use the Android client encryption library.
Jar file
Download
encryption-2.0.0.jarSHA1: 864740734e9806aae1914d461600a4cb88ee5331
Android library project (SDK r6 or higher)
Note
This assumes you are using Eclipse as your development IDE.
- Clone the source code on github.
- Import the Braintree Android library project into your Eclipse workspace.
- Go to your project’s properties.
- Under Android, Library section, add the Braintree Android library project.
Source code
github |
tgz |
zipIntegration examples
github |
tgz
|
zipBugs
If you run into a bug, contact us or create an issue on the
GitHub issue tracker.
Quick start example
import com.braintreegateway.encryption.Braintree;
public class BraintreeExample {
public static void main(String[] args) {
Braintree braintree = new Braintree("your-client-side-encryption-key");
String encryptedCreditCardNumber = braintree.encrypt("4111111111111111");
String encryptedCvv = braintree.encrypt("111");
String encryptedExpirationDate = braintree.encrypt("01/2014");
}
}