Install

The SDK is designed to work with iOS 8 and up. If you would like to install the SDK manually instead of using CocoaPods, see the instructions here.

Via CocoaPods

Put this in your Podfile and then run pod install:

source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/mpymnt/io.mpymnt.repo.pods.git'

target :"<your-app-target>" do
    pod 'payworks', '2.24.1'
end

Additional Steps

For Bluetooth devices like Miura readers , to connect as an external accessory and be able to receive messages while the app is in the background, add additional entries to your Info.plist

  • Key: Supported external accessory protocols (UISupportedExternalAccessoryProtocols), Value: com.miura.shuttle (for Miura readers)
  • Key: Required background modes (UIBackgroundModes), Value: App communicates with an accessory (external-accessory)

  • Then, import the framework in your header file:
    #import <mpos.core/mpos-extended.h>
    
  • And that's it - you are good to go to implement your first transaction workflow!

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 {
    compile 'com.squareup:otto:1.3.5'
    compile 'com.squareup.okhttp:okhttp:2.7.4'
    compile 'com.squareup.okhttp:okhttp-ws:2.7.4'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.4.4'
    compile 'com.parse.bolts:bolts-android:1.2.1'
    compile 'com.couchbase.lite:couchbase-lite-android:1.4.0'
    compile 'com.couchbase.lite:couchbase-lite-android-forestdb:1.4.0'

    compile 'io.payworks:mpos.android.core:2.25.2:@aar'


    // Add those three dependencies if you want to use a Miura card reader
    compile 'io.payworks:mpos.android.accessories.miura:2.25.2:@aar'
    compile 'io.payworks:mpos.android.comlinks.bluetooth:2.25.2:@aar'
    compile 'io.payworks:mpos.android.comlinks.tcp:2.25.2:@aar'

}

If you wish to use ProGuard with your application make sure to add the necessary rules to your ProGuard configuration.

Can we help you?

If you cannot find your answer, contact us and we'll get in touch with you soon.

© Copyright 2017 Payworks GmbH. Legal.