cancelPayment
Cancels the ongoing payment request. This is a best effort call, meaning that the Teya payment app may ignore this request, if, for example, it is too late to cancel it.
This does NOT cancel the subscribers from getting new state changes, in fact, the listeners will still be the way users can check if this request actually took effect.
Parameters
lambda called when there's a result of the attempt to try to cancel the payment. NOTICE that even if the result is CancellationResult.CancellingPayment, it does not mean that the payment will get cancelled in the end.
Deprecated
Use cancelPayment(onResult: (CancellationResultInfo) -> Unit) instead
Cancels the ongoing payment request. This is a best effort call, meaning that the Teya payment app may ignore this request, if, for example, it is too late to cancel it.
This does NOT cancel the subscribers from getting new state changes, in fact, the listeners will still be the way users can check if this request actually took effect.
Parameters
lambda called when there's a result of the attempt to try to cancel the payment. NOTICE that even if the result is CancellationResult.CancellingPayment, it does not mean that the payment will get cancelled in the end.