This SDK enables you to tokenize card data natively from your Android app to IXOPAY's PCI-certified servers.
Table of Contents
- JDK 8 or newer, for the demo app JDK 17 or newer
- M2 repository compatible dependency manager
- Gradle
- Maven
build.gradle
Add the jitpack.io repository:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency, replace VERSION
with the GitHub release name:
dependencies {
...
implementation 'com.ixopay:ixopay-tokenization-android:VERSION'
...
}
build.gradle.kts
Add the jitpack.io repository:
repositories {
// ...
maven("https://jitpack.io")
}
Add the dependency, replace VERSION
with the GitHub release name:
dependencies {
// ...
implementation("com.ixopay:ixopay-tokenization-android:VERSION")
// ...
}
pom.xml
Add the jitpack.io repository:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add the dependency, replace VERSION
with the GitHub release name:
<dependency>
<groupId>com.ixopay</groupId>
<artifactId>ixopay-tokenization-android</artifactId>
<version>VERSION</version>
</dependency>
- IXOPAY account
- API User
- username
- password
- Connector - consisting of
- API key, and
- optional: shared secret
- public integration key
Initialize TokenizationApi
by at least providing a public integration key.
Then call the created TokenizationApi
instance's tokenizeCardData
method.
class App {
public void tokenizeCard() {
TokenizationApi api = com.ixopay.api.tokenization.TokenizationApi.builder()
.integrationKey("YOUR_INTEGRATION_KEY")
.build();
Token result = api.tokenizeCardData(new CardData("4111 1111 1111 1111", "111", "Some cardholder", 2, 2023));
}
}
- For an Android example see: invocation of TokenizationApi.java in MainActivity.java.
- For a minimal example program see: TestMain.java.
To run the demo app, set appropriate credentials in local.properties
(ignored by Git) or gradle.properties
(in Git) in the project root directory.
Then you can start the demo app in your Android simulator.
sdk.dir=ANDROID_SDK_DIR
# default: com.ixopay.gateway_host=https://gateway.ixopay.com
# default: com.ixopay.tokenization_host=https://secure.ixopay.com
com.ixopay.integration_key=IXOPAY_INTEGRATION_KEY
To run the tests, you have to inject environment variables that specify the endpoints:
./gradlew test -Dgateway=$IXOPAY_GATEWAY_HOST -Dtokenization=$IXOPAY_TOKENIZATION_HOST -Dkey=$IXOPAY_INTEGRATION_KEY
If you have suggestions for new features, spotted a bug, or encountered a technical problem, create an issue here. Also, you can always contact IXOPAY's Support Team as defined in your contract.
This repository is available under the MIT License.