NOTE: This repo is deprecated. Please use the new REST APIs
This Android SDK is specifically designed for Point-of-Sales apps that wish to integrate Card Reader and Paynow transactions into their application.
NOTE: If you are looking for online payment acceptance please refer to these REST API docs
To run the example project, clone the repo, and open example app to android studio then run app.
- Authentication Allow your merchant to log in to their hitpay account.
- Connect Card Reader Allow your merchant to connect their card reader to start accepting card payments
- Accept Card Payment Allow your merchant to initiate a payment using the connected card reader
- Accept PayNow Allow your merchant to initiate a payment using the PayNow QR code
- Refund Transaction Allow merchant to perform a full refund on any transactions
HitPay-Android-SDK is available through Maven. To install it, simply add the following line to your Podfile:
- Add to Top-level build.gradle:
buildscript {
...
dependencies {
...
classpath 'com.dipien:bye-bye-jetifier:1.2.1'
}
}
allprojects {
repositories {
...
//Hitpay
maven { url 'https://jitpack.io' }
maven { url 'https://d37ugbyn3rpeym.cloudfront.net/terminal/android-betas' }
}
}
- Add to app build.gradle:
android {
buildFeatures {
dataBinding true
}
}
dependencies {
implementation 'com.hit-pay.android:com.hitpay.terminalsdk:0.0.6'
}
Hitpay.initiateAuthentication()
// To get authentication listener:
Hitpay.setHitPayAuthenticationListener(this);
// Sign out
HitPay.signOut()
//To set production environment set it = true, sandbox set it = false, defalt is true (production)
Hitpay.setEnv(true/false);
// Enable or disable terminal simulation, default is disable.
Hitpay.setSimulatedTerminal(true/false);
// init Teminal
Hitpay.initiateTerminalSetup();
// To get Terminal listener:
Hitpay.setHitPayTerminalListener(this);
Hitpay.makeTerminalPayment(amount: amount, currency: "sgd");
// Cancel current terminal payment,
HitPay.cancelTerminalPayment()
// To get Terminal Charge listener: chargeTerminalCompleted(), cancelTerminalPayment()
Hitpay.setHitPayTerminalChargeListener(this);
Hitpay.makePayNowPayment(amount: amount, currency: "sgd", , generateImage: true);
// "qrCode" represents the string value of the QRCode to be displayed.
// "qrImage" represents UIImage of the QRCode if generateImage set to true
// To get Terminal Charge listener:
Hitpay.setHitPayPayNowChargeListener(this);
Hitpay.refundCharge(charge_id: charge_id);
// To get Refund listener:
Hitpay.setHitPayRefundListener(this);
Support: support@hit-pay.com
Author: 1bannamgiauten
HitPay-Android-SDK is available under the MIT license. See the LICENSE file for more info.