3.4.2 Voided Payments
The void service is used to void the mPos debit and credit sale transaction. Voiding basically cancels transactions. It does not delete it but clears the amount. Cashlez transactions can be voided only if they are not settled yet. Below is Void flow (Figure below).
Void Flow
3.4.2.1 ICLVoidPaymentHandler
The ICLVoidPaymentHandler is a class for canceling approved payment, it provides doVoidPayment. method using ICLVoidPaymentHandler as a parameter object.
Method | Description |
---|---|
doVoidePayment(String userName, String Password, CLPaymentResponse paymentresponse) | this function is used to process void payment |
This function void transaction details using the administrative username and password. The detail of the transaction to be voided is placed in the CLVoidResponse response object like voided by, voided date, voided time.
3.4.2.2 ICLVoidService
The ICLVoidService is a protocol provided by ICLVoidPaymentHandler. It is used to return the result of a void process. (onVoidPaymentSuccess and onVoidPaymentError)
onVoidPaymentSuccess
onVoidPaymentError
Method | Description |
---|---|
onVoidPaymentSuccess(CLVoidResponse response ) | callback when void payment success |
onVoidPaymentError(CLErrorResponse error) | callback when void payment fail/error |