SDK Integration for Aggregators
13. SDK Integration for Aggregators
This section provides integration details for aggregators.
13.1 Instantiate SDK
See Instantiate SDK for details.
13.2 Initialize payment
See Initialize Payment for details.
13.3 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.
13.4 Payment Confirmation
Implement the displayPaymentConfirmation
call back 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")
}
13.5 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) {}
13.6 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 7 months ago