subscribe
abstract fun subscribe(listener: PaymentStateSubscription.PaymentStateChangeListener): PaymentStateSubscription
Subscribes the listener to receive state change updates. Some states may be skipped by some implementations, don't assume that you'll get notified for each individual intermediate state.
PosLink specifics:
Adding the first listener will cause the SDK to initiate the update flow connection to the server. If all listeners are removed, the SDK will stop the update connection. It is possible to subscribe again, at any point, to restart the updating flow.
Parameters
listener
The listener to be notified of state changes.