Thanx S D K
Installation
The Thanx Android SDK is distributed via a public github packages maven repository. Github requires authentication even for public packages, so you must generate a token with the "read:packages" scope and configure the repo with credentials in your build.gradle
file. See github's documentation for more details https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry
One way to store these credentials is in a gradle.properties
file.
# gradle.properties
ghr.user=<your_github_username>
ghr.key=<your_github_token>
# build.gradle
allprojects {
repositories {
maven {
url = 'https://maven.pkg.github.com/thanx/thanx-sdk-android-distribution'
credentials {
username = project.findProperty("gpr.user")
password = project.findProperty("gpr.key")
}
}
}
}
Next, you need to include the SDK in your app level Gradle dependencies.
# build.gradle
dependencies {
implementation 'com.thanx.sdk:thanx-sdk-android:1.0.0
}
Since the SDK is written in Kotlin, any Android projects written in Java must include the Kotlin Standard Library as a dependency.
# build.gradle
dependencies {
implementation 'com.thanx.sdk:thanx-sdk-android:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10"
}
Packages
com.thanx.sdk.cardEncryption
Link copied to clipboard
This package provides methods to encrypt credit cards so you can then send the encrypted PAN to the Thanx API to create and enroll a card into the loyalty platform.