Event Tracking¶
GiniMerchant¶
The GiniMerchant class exposes a kotlin flow which you can collect to track events:
eventsFlowis aSharedFlowofMerchantSDKEvents. It emits the following events:NoActionis the idle stateOnLoadingwhen communicating with the Gini Merchant API (e.g., creating a payment request).OnScreenDisplayed(displayedScreen)when there is a change in the screens displayed within the payment flow.OnFinishedWithPaymentRequestCreated(paymentRequestId, paymentProviderName)when the payment request is ready and the user is redirected to the bank.OnFinishedWithCancellationwhen the payment flow was cancelled. Can be either from an internal error, or from exiting the payment flow without finalising it.OnErrorOccurred(throwable)when there was an error within the payment flow.
Note
OnFinishedWithPaymentRequestCreated and OnFinishedWithCancellation can be checked for to remove the PaymentFragment from the hierarchy.