Skip to main content

Merchant Data SDK Reference

Integration#

In the top level build.gradle#

  • Add Google Play Services:
dependencies {
classpath 'com.google.gms:google-services:4.3.10'
...
}

In settings.gradle or module level build.gradle#

  • Create a new Personal Access Token with the scope: read:packages

  • Add:

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/datasutram/merchantaquisition-sdk")
credentials {
username = "**USER**"
password = "**ACCESS_TOKEN**"
}
}
}
  • Replace USER and PASSWORD above wih your github username and read only personal access token.

In the module level build.gradle#

  • Add the Google Play Services plugin:
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
  • Enable view binding and data binding:
android {
buildFeatures {
viewBinding true
dataBinding true
}
}
  • Add the SDK:
dependencies {
implementation "com.ds.merchant:merchant-acquisition:2.0.5"
...
}

Set up Google Play Services#

  • Set up a Firebase project for your app. If you don't have one already:

  • Follow Step 1, Step 2, and Step 3 of "Add Firebase using the Firebase console". Skip Step 4.

Launch Merchant Acquisition#

Call MerchantAcquisition.startApp(context, token, faId);