PaymentComponent

public final class PaymentComponent

The PaymentComponent manages the data and state used by every PaymentComponentView, the MoreInformationFragment, and the BankSelectionBottomSheet.

It requires a GiniHealth instance and a Context (application or activity) to be created.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
public interface Listener

A listener for the PaymentComponent. It exposes the user interactions with all of the PaymentComponentViews.

Functions

Link copied to clipboard

A listener for the payment component. It exposes the user interactions with all of the PaymentComponentViews. See Listener for the methods you need to implement.

Link copied to clipboard

A StateFlow which emits the state of the payment provider apps. See PaymentProviderAppsState for the possible states.

Link copied to clipboard
public final ReviewFragment getPaymentReviewFragment(String documentId, ReviewConfiguration configuration)

Loads the extractions for the given document id and creates an instance of the ReviewFragment with the given configuration.

Link copied to clipboard
public final StateFlow<Boolean> getReturningUserFlow()

A StateFlow which emits whether the user is a returning one or not.

Link copied to clipboard

A StateFlow which emits the state of the selected payment provider app. See SelectedPaymentProviderAppState for the possible states.

Link copied to clipboard

Loads the payment provider apps and selects the first installed payment provider app or nothing if no payment provider app is installed. The selection (or lack of selection) will be visible once a PaymentComponentView is shown.

Link copied to clipboard
public final Unit setListener(PaymentComponent.Listener listener)

A listener for the payment component. It exposes the user interactions with all of the PaymentComponentViews. See Listener for the methods you need to implement.

Link copied to clipboard
public final Unit setPaymentComponentConfiguration(PaymentComponentConfiguration paymentComponentConfiguration)

Properties

Link copied to clipboard

A listener for the payment component. It exposes the user interactions with all of the PaymentComponentViews. See Listener for the methods you need to implement.

Link copied to clipboard

A StateFlow which emits the state of the payment provider apps. See PaymentProviderAppsState for the possible states.

Link copied to clipboard
private final StateFlow<Boolean> returningUserFlow

A StateFlow which emits whether the user is a returning one or not.

Link copied to clipboard

A StateFlow which emits the state of the selected payment provider app. See SelectedPaymentProviderAppState for the possible states.