Payment Component View
The PaymentComponentView is a custom view widget and the main entry point for users. It allows them to pick a bank and initiate the payment process. In addition, it also allows users to view more information about the payment feature.
It is hidden by default and should be added to the layout of each invoice item.
When creating the view holder for the invoice item, pass the PaymentComponent instance to the view holder:
val paymentComponentView = view.findViewById(R.id.payment_component)
paymentComponentView.paymentComponent = paymentComponent
When binding the view holder of the invoice item, prepare the PaymentComponentView for reuse, set the payable state and the document id:
viewHolder.paymentComponentView.prepareForReuse()
viewHolder.paymentComponentView.documentId = invoiceItem.documentId
Note: The PaymentComponentView will only be visible if its PaymentComponentView.isPayable property is true
.
Constructors
Types
Functions
The document id of the invoice item. This will be returned in the PaymentComponent.Listener.onPayInvoiceClicked method.
The PaymentComponent instance which provides the data and state for the PaymentComponentView.
Resets the internal state of the PaymentComponentView to its default state. This should be called before the view is reused.
The document id of the invoice item. This will be returned in the PaymentComponent.Listener.onPayInvoiceClicked method.
Properties
The document id of the invoice item. This will be returned in the PaymentComponent.Listener.onPayInvoiceClicked method.
The PaymentComponent instance which provides the data and state for the PaymentComponentView.