onStateChanged

open fun onStateChanged(state: T)

You can implement this optional method to receive an update any time the state of the component changes.

This mainly occurs through a user interaction (editing an input, selecting an item from a list, etc) and will be triggered regardless whether the component is valid or not.

We provide a PaymentComponentState which contains information about the state of the payment component at that moment.

Parameters

state

The state of the payment component at the current moment.