Integration for Aggregators
Velocity Android Software Development Kit Integration Guide
This section provides details for aggregators integrating the Android SDK.
Instantiate SDK
See Instantiate SDK in the 'Integrating SDK' section of this guide.
Initialize Payment
Refer to Initialize Payment in the 'Integrating SDK' section of this guide.
Authorize Payment
To authorize payment, the front-end application needs to display the available list of payment methods. After the you select a particular payment method out of the list, you can initialize a payment for aggregators by sending the authorize call to the SDK to process payment as shown in the following sample:
var addressInfo = [mPointAddressInfo]
var authToken = [AUTH_TOKEN]
var paymentMethod = [mPointCardPaymentMethod] // Selected Payment Method
mPoint.authorize(mPointAuthorizeInfo(cardInfo)
.setCardPaymentMethod(paymentMethod)
.setActivity(activity)
.setAddressInfo(addressInfo)
.setClientInfo(clientInfo)
.setAuthToken(authToken))
Note: The
setAuthToken
parameter can be optional or required depending on merchant requirements.
Payment Confirmation
Implement the displayPaymentConfirmation
callback method to receive the transaction status as shown in the following code sample:
override fun displayPaymentConfirmation(txn: mPointTxnInfo?, code: Int, mpoint: mPoint) {
Log.d(TAG, "displayPaymentConfirmation")
}
Handle Error
A handle error occurs when there an error in parsing. The status code reveals the type of error that has occurred in the SDK. For details of the status code, refer to Status Codes.
override fun handleError(errorInfo: mPointErrorInfo, client: Client, mpoint: mPoint) {}
Handle Status
The status codes are returned by the SDK in a call back to the handleStatus
method. This method enables the application to handle the status appropriately by implementing the method as shown in the following code sample:
The handleStatus
method shows an error in the CPD server.
override fun handleStatus(statusInfo: mPointStatusInfo, client: Client, mpoint: mPoint) {}
Updated 3 months ago