PaymentComponent

public final class PaymentComponent

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

It requires a GiniMerchant 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
public final Boolean checkReturningUser()
Link copied to clipboard

Holds information about which layout to use for the bank picker: single line or two lines.

Link copied to clipboard
public final Locale getGiniPaymentLanguage(Context context)
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
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

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

Link copied to clipboard

Whether we need to check for returning user and hide Select your bank to pay label.

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 onPayInvoiceClicked(String documentId)
Link copied to clipboard
public final Unit setBankPickerRows(BankPickerRows bankPickerRows)

Holds information about which layout to use for the bank picker: single line or two lines.

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)
Link copied to clipboard
public final Unit setShouldCheckReturningUser(Boolean shouldCheckReturningUser)

Whether we need to check for returning user and hide Select your bank to pay label.

Properties

Link copied to clipboard

Holds information about which layout to use for the bank picker: single line or two lines.

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
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

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

Link copied to clipboard

Whether we need to check for returning user and hide Select your bank to pay label.