Need help?

Android

Usage

In order to run the demo correctly, please make sure to replace the StoreID and Key within the demo to the one provided by Telr. Also, be sure to replace the email.

You can check your Store ID from the top header section of your merchant site, and the Key from the left side menu at the following path Integration -> Mobile API Settings.

Download the SDK library & demo

You can download our SDKs from https://github.com/orgs/Telr-PG/repositories

Installation

To use your Telr SDK library in your new project, proceed as follows:

  • Add the library <<company_name_lower_case>>library-release.jar to your project:
  • Add the file:Click File > New Module.
  • Click Import .JAR/.AAR Package then click Next.
  • Enter the location of the AAR file then click Finish.

Make sure the library is listed at the top of your settings.gradle file, as shown here for a library named “my-library-module”:

include `':app', ':<<company_name_lower_case>>library-release'`

Open the app modulesbuild.gradle file and add a new line to the dependencies block as shown in the following snippet and Rebuild your project.

dependencies {  
    compile project(":<<company_name_lower_case>>library-release")  
    compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'  
    compile ('org.simpleframework:simple-xml:2.7.1',{  
       exclude group:'stax', module:'stax'  
       exclude group:'stax', module:'stax-api'  
       exclude group:'xpp3', module:'xpp3'  
    })  
}  
Add the following lines inside your app module build.gradle  
packagingOptions {  
    exclude 'META-INF/license.txt'  
    exclude 'META-INF/notice.txt'  
}

You’ll find three activities inside the demo project:

MainActivity

This sample screen represents your page of collecting user info and amount from your shopping cart ready for checkout.

SuccessTransationActivity

This sample screen represents the success call back screen after the payment has been done successfully.

FailedTransationActivity

This sample screen represents the failed callback screen after the payment has failed for any reason.

You can try the Demo built-in using Android Studio on your Android device or simulator.

How it works

The SDK will do all the internal work of calling all APIs and getting the proper response, so the developer can customize the look and feel of the checkout and the results screens to fit his design and requirements.