CollectionPayScreenViewModel
ViewModel for the Collection Request-to-Pay screen.
On submit it runs the full Collection request-to-pay flow against the SDK:
requestToPay— asks the payer to approve a debit from their wallet (HTTP 202).An optional
requestToPayDeliveryNotificationwhen a delivery note is provided.requestToPayTransactionStatus— polls the outcome (RequestToPayStatus) and posts it to requestToPayStatus.
The screen shows the input form while requestToPayStatus is null and the result once it is set. Authentication is handled automatically by the SDK's interceptor/authenticator, so the ViewModel only guards on the presence of an access token before starting.
Constructors
Properties
The current delivery note entered in the form.
The current financial ID entered in the form.
The current payer message entered in the form.
The current phone number entered in the form.
The current reference ID to refund entered in the form.
Holds the RequestToPayStatus returned by the API; null while no request has succeeded.
Controls whether the circular progress indicator is shown instead of the screen content.
Flow of SnackBarComponentConfiguration events to be displayed as snack bars.
Functions
Updates the amount field value.
Updates the delivery note field value.
Updates the financial ID field value.
Updates the payer message field value.
Updates the payer note field value.
Updates the phone number field value.
Updates the reference ID to refund field value.
Submits a Collection request-to-pay, optionally sends a delivery note, then polls the status and posts the resulting RequestToPayStatus to requestToPayStatus.