General information
SDK Assist.Mobile makes it possible to simplify the development of a mobile app of an online store for making the bank card payments with mobile devices using IPS Assist.
The users of SDK Assist.Mobile are the developers of the mobile app of the online store.
This document contains sufficient information on installing, configuring and using the Assist.Mobile SDK to use it.
System requirements
To work with Assist.Mobile, you need to use Android SDK version 15 or higher (Android 4.0.3).
Description of SDK Assist.Mobile
The Assist.Mobile SDK is a mobilePay-release-X.X.X.aar file. To access the functionality of the library, you must use the class:
ru.assisttech.sdk.AssistSDK
This class contains the following method:
AssistPayEngine AssistSDK.getPayEngine(Activity activity)
The method returns an instance of a class that implements payment functions for individuals.
After receiving the AssistPayEngine object, you need to initialize it to make a payment. To do this, you need to set the address of the server through which payment will be made by calling the method:
assistPayEngine.setServerURL(String url).
To control and receive the result of the work of AssistPayEngine, the PayEngineListener interface is used, which is installed by the method:
void assistPayEngine.setEngineListener(PayEngineListener listener).
To start the payment process, use the following method:
assistPayEngine.payWeb(Activity caller, AssistPaymentData data, boolean useCamera),
where
caller – Activity, from which the payment process is launched;
data - object, parameters and data required for making a payment;
useCamera - a flag indicating to use the mobile device's camera to read the customer's bank card number or enter the number manually.
After the successful completion of the payment, you can save the buyer's signature using the method:
void assistPayEngine.setUserSignature(long id, byte[] signature),
where
id - payment transaction ID.
Additionally, you can check the result of the payment using the method:
void assistPayEngine.getOrderResult(Activity caller, long id).
You can interrupt the payment process using the following method: