Sample App Code
2.1 Summary
This SDK documentation includes an example app on how to use and the best practice of using the SDK. The example app is delivered with the Java source code.
Prior knowledge of Android Java programming, Gradle build and Android Studio IDE are required to understand the sample app. Knowledge in Model-View-Presenter (MVP) design pattern is also a recommendation to understand the architecture of the example app. The code snippets of the example app are used throughout the document to describe how the SDK should be used.
2.2 Availability
The link to download the example app should be available and given with the documentation, otherwise please contact your Cashlez contact person to request one. Currently Cashlez have iOS SDK and Android SDK.
2.3 Implementation of Sample App/Code
Extract the sample rar code that has been provided from the Cashlez Product Team. Then open a new project in android studio or idx, select the extracted project.
When the import is successful and the dependencies are resolved, the module can be deployed in an android mobile phone. The example app Login screen is shown in Figure 2.4. To interact with the card reader dongle the example app must be deployed in a real device, currently using an android emulator is not yet supported.
2.4 Implementation of Cashlez Lib or SDK
- Download Cashlez Lib given by Cashlez Product Team.
- Download file github.properties given by Cashlez Product Team.
- Open your Gradle Project, then implements the github.properties into Gradle Project.
- Open your Gradle Project, then implements the Library SDK Cashlez
com.cashlez.android:cashlez:x.x.x.x
2.5 Application Interface
In this version, the UI already revamped to a whole new fresh look. On this landing page, it has a new look and compact design. We re-design this to simplify the usage of the sample for our merchant.
These are the components inside this landing page based on Figure Cashlez Lib Sunmi (after figure belows):
No. | Name | Description |
---|---|---|
1. | Amount text box | this will add amount to pay on the payment |
2. | Description text area | This will add description to the payment details |
3. | Upload | This will upload image from local storage and put it inside to the cloud storage |
4. | Reader and printer status | This will return the status of the reader and printer, whenever it's connected:
|
5. | Pay button | This button will redirect user to the payment page |
6. | Check reader button | Return toast alert of the reader status |
7. | Check printer button | Return toast alert of the printer status Page 12 |
When redirected to the payment page, it will show the options for payment, and also the amount and payment description. Based on second figure below. Several mandatory fields taken from the home page will appear on the payment page such as amount text, description text, printer, and reader status.
For each payment we have different UI, these are the list of our payment
Payment Options | Payment Name |
---|---|
International Card | Debit/Credit Card |
Cash | Cash Money |
Debit Transfer New Activity | Mini ATM bersama (Bank Transfer) |
LinkAja New Activity | Payment QRIS LinkAja |
Go-Pay QR New Activity | Payment QRIS Go-Pay |
OVO New Activity | Push to Pay OVO |
Artajasa New Activity | VA (ATM Bersama) |
Kredivo New Activity | Payment Paylater Kredivo QR |
Shopee QR New Activity | Payment QRIS ShopeePay |
Permata VA New Activity | Permata (ATM Bersama) |
BCA VA New Activity | BCA VA |
Vospay New Activity | Push to Pay (paylater) |
Nobu QRIS New Activity | Payment QRIS Nobu |
No | Name | Description |
---|---|---|
1. | Void Payment | To Void Payment |
2. | To Print Receipt Payment | |
3. | Send Receipt | To Send Receipt Payment |