Skip to content

tiger30/Mobile-API-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Platform Version API Berlin

payleven Point Pay API

The PaylevenAppApi makes possible for app developers to open the payleven application from within their own apps and process payments. Although the payment is initiated on your app, it is the payleven application that takes care of handling the payment process. After a payment is processed, it will open your app and notify if the payment was successful, canceled or failed.

Note: The product has been renamed to payleven Point Pay API from Mobile API. Any references within the documentation or classes are relevant to payleven Point Pay API.

Main Features

  • Connects to payleven EMV/PCI certified card reader via bluetooth
  • Accept all major card schemes such as Visa, Mastercard or American Express
  • Provide immediate information about the payment status
  • Refund card payments
  • Supports cash payment method
  • Supports all main languages

Prerequisites

  • You or your client is operating in one of the countries supported by payleven.
  • You are registered as a regular payleven user in a payleven country.
  • You have signed up here and received your API key.
  • The iOS or Android payleven app is installed on the mobile device you want to use for accepting card payments.
  • A payleven Classic (Chip & PIN) or Plus (NFC) terminal.
  • Internet connection and geo location is available in your general use-case

Table of Contents

Installation

Include the Mobile API file to your project:

Gradle

1 - Create a 'libs' folder in the top level of the module directory.

2 - Copy the mobile API JAR file to the libs folder.

3 - In the module's build.gradle file add the following:

dependencies {
    compile files('libs/payleven-android-sdk-2.0.2.jar')
}

4 - Sync project with Gradle Files.

Maven

1 - Create a 'libs' folder in the top level of the module directory.

2 - Copy the mobile API JAR file to the libs folder.

3 - Right click on the Jar file and then select Build Path > Add to Build Path.

Setup your app

Use the API key received from payleven to setup your app. Before doing payments you need to configure the API. In the following example replace "yourApiKey".

PaylevenApi.configure(yourApiKey);

Start Payment

Below you see an example payment call to open the payleven app with an amount, a custom order ID, a description and a product picture. Once a payment is triggered and to ensure a stable flow, these values cannot be changed in the payleven app anymore, however you can cancel the payment and you will jump back to your app.

TransactionRequestBuilder builder = new TransactionRequestBuilder(amount, currency);
                    .setDescription(description)
                    .setBitmap(image);
                    
TransactionRequest request = builder.createTransactionRequest()
                            
PaylevenApi.initiatePayment(MainActivity.this, orderId, request);

Open transaction history

To open the transaction history you have to call the openSalesHistory method. Below you see an example of the transaction history call to open the payleven App at the transaction history view.

PaylevenApi.openSalesHistory(MainActivity.this);

Open transaction details

To open the details view of a transaction you have to call the openTransactionDetails method and set the order ID of such transaction. Below you see an example of this call:

PaylevenApi.openTransactionDetails(MainActivity.this, orderId);

Refund transaction

It is also possible to refund a transaction. Calling the method openTransactionDetailsForRefund and providing an order ID will open a transaction details view with the option to refund the payment. Below you see an example of this call:

PaylevenApi.openTransactionDetailsForRefund(MainActivity.this, orderId);

Bluetooth pairing

Before proceeding with the integration and testing, make sure you have paired the card reader.

  1. Make sure the device is charged and turned on.
  2. Press '0' key on the card reader for 5 sec and make sure the card reader has entered the pairing mode (there will be a corresponding sign on the screen).
  3. Go to the payleven app, open the menu, select Account and tap on Default payment method. It will pop up a window where you should select Card.
  4. In the same account screen, tap on Manage terminals and follow the app instructions.

Documentation

API Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages