Custom Integration

Anslået læsetid: < 1 min

Install

The SDK is designed to work with Android 2.3 and up. If you would like to install the SDK manually instead of using our gradle repository, see the instructions here.

Via gradle

  • Add our repository to your project’s build.gradle:
allprojects {
    repositories {
        jcenter()
        maven {
            url "http://releases.payworks.io/artifactory/mpos"
        }
    }
}
  • Add the following exclusion rules to your module’s build.gradle (inside the android section):
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/NOTICE'
    exclude 'LICENSE.txt'
    exclude 'asm-license.txt'
    exclude 'META-INF/ASL2.0'
}
  • Add the libraries to the dependencies section of your module’s build.gradle:
dependencies {
 
    implementation 'io.payworks:mpos.android.core:2.37.0'

    // Add these three dependencies if you want to use a Miura card reader
    implementation 'io.payworks:mpos.java.accessories.miura:2.37.0'
    implementation 'io.payworks:mpos.android.comlinks.bluetooth:2.37.0:@aar'
    implementation 'io.payworks:mpos.java.comlinks.tcp:2.37.0'

    // Add these two dependencies if you want to use a Verifone card reader
    implementation 'io.payworks:mpos.java.accessories.vipa:2.37.0'
    implementation 'io.payworks:mpos.java.comlinks.tcp:2.37.0'
}