Skip to main content

Sampel App/Code

2.1 Ringkasan

Dokumentasi SDK ini mencakup Sampel App tentang cara penggunaannya and praktik terbaik dalam menggunakan SDK. Sampel App dikirimkan dengan Java Source Code.

Pengetahuan sebelumnya tentang pemrograman Android Java, Gradle build and Android Studio IDE dibutuhkan dalam memahami Sampel App ini. Memiliki pengetahuan dalam pola desain Model-View-Presenter (MVP) juga merupakan sebuah rekomendasi untuk memahami Arsitektur dari Sampel App. code snippets dari Sampel App are digunakan diseluruh dokumen untuk mendeskripsikan bagaimana penggunaan SDK seharusnya.

2.2 Ketersediaan

Tautan untuk mengunduh Sampel App harus tersedia dan diberikan dengan dokumentasi. Jika tidak, hubungi Cashlez atau personal yang berperan untuk dimintai dokumentasinya terkait hal tersebut. Untuk sekarang, Cashlez mempunyai SDK untuk Android dan iOS.

2.3 Implementasi Sampel App/Code

Ekstrak sample rar code yang sudah disediakan oleh Tim Produk Cashlez. Kemudian buka sebuah project baru di dalam Andorid Studio atau idx, pilih project yang diekstrak.

figure 2.1

Ketika impor berhasil dan dependencies tertangani, modul tersebut bisa di-deploy pada Android mobile phone. Example app, layar login ditampilkan pada gambar di atas. Untuk interaksi dengan card reader dongle Sampel Aplikasi harus di-deploy pada sebuah perangkat yang asli, namun sekarang belum mendukung android emulator.

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 Implementasi Cashlez Lib atau SDK

  1. Unduh Cashlez Lib yang disediakan oleh tim produk Cashlez.
  2. Unduh file github.properties yang disediakan oleh tim produk Cashlez.
  3. Buka Gradle Project anda, kemudian implementasikan github.properties ke dalam Gradle Project.
  4. Buka Gradle Project anda, kemudian implementasikan Library SDK Cashlez
    com.cashlez.android:cashlez:x.x.x.x

2.5 Antarmuka Aplikasi

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.

Pada versi ini, UI sudah dirubah menjadi tampilan baru yang lebih menyegarkan. Pada landing page-nya memiliki tampilan yang baru dan desain yang kokoh. Didesainnya ulang hal ini karena bertujuan mensederhanakan penggunaan Sampel App untukmerchant Cashlez.

figure 2.2

These are the components inside this landing page based on Figure Cashlez Lib Sunmi (after figure belows):

Halaman Home
No.NameDescription
1.Amount text boxthis will add amount to pay on the payment
2.Description text areaThis will add description to the payment details
3.UploadThis will upload image from local storage and put it inside to the cloud storage
4.Reader and printer statusThis will return the status of the reader and printer, whenever it's connected:
  • if the printer is ready, it will return the status of the printer which is true.
  • if it's disconnected, it will return false.
5.Pay buttonThis button will redirect user to the payment page
6.Check reader buttonReturn toast alert of the reader status
7.Check printer buttonReturn toast alert of the printer status Page 12


figure 2.3

Ketika dialihkan ke halaman pembayaran, hal ini akan menunjukkan opsi untuk pembayaran, dan juga jumlah serta deskripsi pembayaran. Based on secondary figure from below. Several mandatory fields taken from the home page will appear on the payment page such as amount text, description text, printer, dan status reader.

Untuk setiap pembayaran kami memiliki UI yang berbeda - beda, berikut adalah daftar setiap pembayaran:

Daftar Pembayaran
Payment OptionsPayment Name
International CardDebit/Credit Card
CashCash Money
Debit Transfer New ActivityMini ATM bersama (Bank Transfer)
LinkAja New ActivityPayment QRIS LinkAja
Go-Pay QR New ActivityPayment QRIS Go-Pay
OVO New ActivityPush to Pay OVO
Artajasa New ActivityVA (ATM Bersama)
Kredivo New ActivityPayment Paylater Kredivo QR
Shopee QR New ActivityPayment QRIS ShopeePay
Permata VA New ActivityPermata (ATM Bersama)
BCA VA New ActivityBCA VA
Vospay New ActivityPush to Pay (paylater)
Nobu QRIS New ActivityPayment QRIS Nobu


figure 2.5
figure 2.6
Detail Riwayat Pembayaran
NoNameDescription
1.Void PaymentTo Void Payment
2.PrintTo Print Receipt Payment
3.Send ReceiptTo Send Receipt Payment