UserAgentUIBackend Class

The user interface of the user agent (BrowsingContextOptions.UserAgentUI): the prompts that the APIs of the web platform show to the user, such as the credential choosers of the Credential Management API, the account chooser of FedCM, the payment sheet of the Payment Request API, the transaction dialog of Secure Payment Confirmation and the wallet of the Digital Credentials API. The library implements the algorithms of these APIs and calls the backend when the user agent would show something: the backend shows the prompt (or answers it without showing anything, e.g. in tests) and returns the answer of the user asynchronously.

public abstract class UserAgentUIBackend

Remarks

Each kind of prompt is a virtual method, which receives a description of the prompt (a UserAgentPrompt: the window that shows it, the origin of its document, and what the user is asked) and a token that is canceled when the page no longer needs the answer (the request is aborted, its document is unloaded...): the backend should then close the prompt. The default implementation of every method answers as if the user dismissed the prompt, so a backend overrides only the prompts it supports. Without a backend (the default), every prompt is dismissed.

The methods are called on the thread of the event loop of the window that shows the prompt; the task they return can complete on any thread (the library settles the promises of the page on its event loop). A backend can be shared by several browsing contexts. An exception thrown by a method is handled as a dismissal of the prompt.

Constructors

NameDescription
UserAgentUIBackend()Initializes a new instance of the UserAgentUIBackend class.

UserAgentUIBackend()

UserAgentUIBackend.cs

Initializes a new instance of the UserAgentUIBackend class.

protected UserAgentUIBackend()

Methods

NameDescription
ChooseCredentialAsync(CredentialChooserPrompt, CancellationToken)Asks the user to choose a credential of the credential store of the user agent (https://w3c.github.io/webappsec-credential-management/#abstract-opdef-ask-the-user-to-choose-a-credential), for navigator.credentials.get() with the password or federated member: the stored PasswordCredential and FederatedCredential of UserAgentPrompt.Origin that match the request. When CredentialChooserPrompt.Mediation is CredentialMediationRequirement.Silent, the backend must not show anything: it returns the only matching credential or null. The default implementation returns null: there is no stored credential (or the user dismissed the chooser).
ChooseIdentityAccountAsync(IdentityAccountChooserPrompt, CancellationToken)Asks the user to choose an account of the identity providers of navigator.credentials.get({ identity }) (https://w3c-fedid.github.io/FedCM/#create-an-identitycredential): the accounts returned by the accounts endpoints of the providers, filtered by the hints of the request. The backend returns the chosen account (IdentityAccountChoice.Select, the user signs in or signs up to the site with it), the request to sign in to another account (IdentityAccountChoice.UseOtherAccount, when IdentityAccountChooserPrompt.SupportsUseOtherAccount is true: the login page of the provider is opened, then the accounts are fetched again and the chooser is shown again), or null when the user closes the chooser (the request fails with a NetworkError). The default implementation returns null.
CompletePaymentAsync(PaymentSheetPrompt, PaymentComplete, string, CancellationToken)Closes the payment sheet once the page processed an accepted payment (PaymentResponse.complete(), https://w3c.github.io/payment-request/#complete-method): the backend can show the outcome to the user. The promise of complete() is resolved when the task completes. The default implementation completes at once.
ConfirmIdentityProviderLoginAsync(IdentityProviderLoginPrompt, CancellationToken)Asks the user whether to sign in to an identity provider (the confirm IDP login dialog, https://w3c-fedid.github.io/FedCM/#create-an-identitycredential): the user agent expected the user to be signed in to the provider (its login status is logged in), but its accounts endpoint returned no account matching the request. When the backend returns true (the user continues), the library opens the login page of the provider in a new window (IdentityProviderLoginPrompt.LoginUrl), waits until the page calls IdentityProvider.close(), then fetches the accounts again. The default implementation returns false: the request fails with a NetworkError.
HasPaymentHandlerAsync(PaymentHandlerQuery, CancellationToken)Returns whether the user agent has a payment handler that can make a payment with a payment method (https://w3c.github.io/payment-request/#dfn-steps-to-check-if-a-payment-can-be-made), for PaymentRequest.canMakePayment() and PaymentRequest.show(): the payment sheet only offers the supported methods, and show() fails with a NotSupportedError when no method is supported. The default implementation returns false: no payment method is supported.
IngestPaymentMethodManifestAsync(PaymentMethodManifestRequest, CancellationToken)Ingests the payment method manifest of a URL-based payment method identifier (https://w3c.github.io/payment-method-manifest/#ingest-payment-method-manifests), when a page asks whether it can make a payment with it (PaymentRequest.canMakePayment(), PaymentRequest.show()). The backend calls PaymentMethodManifestRequest.FetchAsync to fetch the manifest and the web app manifests of its default payment applications, then installs the payment handlers in a way that is specific to the user agent, and remembers the origins that can provide payment handlers for the method. As ingesting a manifest tells the owner of the payment method that the user visits the page, the default implementation fetches nothing.
OpenDocumentPictureInPictureWindow(PictureInPictureWindowRequest)Opens the Picture-in-Picture window of a document (DocumentPictureInPicture.RequestWindow), a floating top-level browsing context, and returns the size of its viewport in CSS pixels, or null when the user agent cannot open it (the request fails with a NotAllowedError). The method is synchronous: requestWindow() returns the new window at once. The size is clamped to 80% of the screen. The backend changes the size of the window and closes it later through PictureInPictureWindowRequest.Handle; the browsing context is BrowsingContext.IsDocumentPictureInPicture.
OpenPictureInPictureWindowAsync(PictureInPictureWindowRequest, CancellationToken)Opens the Picture-in-Picture window of a video (HtmlVideoElement.RequestPictureInPicture): the backend shows the video in a floating window and returns the size of the window in CSS pixels, or null when the user agent cannot open it (the request fails with an InvalidStateError). The backend changes the size of the window and closes it later through PictureInPictureWindowRequest.Handle.
RequestDigitalCredentialAsync(DigitalCredentialPrompt, CancellationToken)Shows the digital credential chooser (https://w3c-fedid.github.io/digital-credentials/#dfn-digital-credential-chooser): the user selects a wallet and a credential that answers one of the requests of navigator.credentials.get({ digital }) (a presentation) or navigator.credentials.create({ digital }) (an issuance), and the wallet returns its response. The default implementation returns null: the user cancels, and the promise of the page is rejected with a NotAllowedError.
RetryPaymentAsync(PaymentSheetPrompt, CancellationToken)Shows the payment sheet again so that the user fixes the errors of an accepted payment (PaymentResponse.retry(), https://w3c.github.io/payment-request/#retry-method): PaymentSheetPrompt.Errors describes the errors. Returns the new response of the user (with the same payment method), or null when they dismiss the sheet (the promise of retry() is rejected with an AbortError). While the sheet is shown, the backend can report the changes of the payer details with PaymentSheetPrompt.ChangePayerDetailsAsync. The default implementation returns null.
ShowIdentityAutoReauthenticationAsync(IdentityAutoReauthenticationPrompt, CancellationToken)Tells the user that they are signed in again to the site with a returning account, without choosing it (the auto reauthentication, https://w3c-fedid.github.io/FedCM/#create-an-identitycredential). The backend returns false when the user cancels the reauthentication (the request fails with a NetworkError). The default implementation returns true, as does the library without backend.
ShowIdentityCredentialErrorAsync(IdentityCredentialErrorPrompt, CancellationToken)Tells the user that the identity provider did not mint a token for the chosen account (https://w3c-fedid.github.io/FedCM/#create-an-identitycredential): the request fails with an IdentityCredentialError once the backend completes (the user acknowledged or dismissed the error). The default implementation completes at once.
ShowPaymentSheetAsync(PaymentSheetPrompt, CancellationToken)Shows the payment sheet of a payment request (PaymentRequest.show(), https://w3c.github.io/payment-request/#show-method) and returns the response of the user once they accept the payment, or null when they dismiss the sheet (the promise of show() is rejected with an AbortError). While the sheet is shown, the backend reports the changes of the user with the methods of the prompt (PaymentSheetPrompt.ChangeShippingAddressAsync, PaymentSheetPrompt.ChangeShippingOptionAsync, PaymentSheetPrompt.ChangePaymentMethodAsync), which fire the events of the page and return the details updated by the page. The token is canceled when the page aborts the request (abort()), an update of the details fails, or the document is unloaded. The default implementation returns null.
ShowSecurePaymentConfirmationAsync(SecurePaymentConfirmationPrompt, CancellationToken)Shows the transaction dialog of Secure Payment Confirmation (PaymentRequest.show() with the secure-payment-confirmation payment method, https://w3c.github.io/secure-payment-confirmation/#sctn-transaction-confirmation-ux) and returns the choice of the user. The dialog shows the payee, the total and the payment instrument of the prompt; when the user accepts the transaction, the user agent authenticates the payment with one of the credentials of the prompt (Web Authentication, on the authenticators of WebAuthenticationOptions.Authenticators). The token is canceled when the page aborts the request (abort()) or the document is unloaded. The default implementation returns SecurePaymentConfirmationChoice.Decline.
StoreCredentialAsync(CredentialStorePrompt, CancellationToken)Asks the user whether to save a credential in the credential store of the user agent (navigator.credentials.store() of a PasswordCredential or a FederatedCredential, https://w3c.github.io/webappsec-credential-management/#algorithm-store): the backend saves it (or updates the stored credential that has the same identifier) when the user accepts. The page is not told whether the credential was saved. The default implementation saves nothing.
ValidatePaymentMethodData(string, string)Validates the data of a payment method when a PaymentRequest is constructed (https://w3c.github.io/payment-request/#dfn-steps-to-validate-payment-method-data), for the payment methods that define an additional data type: the method throws a TypeErrorException or a RangeErrorException, rethrown by the constructor, when the data is not valid. It is called synchronously, on the thread of the event loop of the window, for each payment method that has data. The default implementation accepts any data.

ChooseCredentialAsync(CredentialChooserPrompt, CancellationToken)

UserAgentUIBackend.Credentials.cs

Asks the user to choose a credential of the credential store of the user agent (https://w3c.github.io/webappsec-credential-management/#abstract-opdef-ask-the-user-to-choose-a-credential), for navigator.credentials.get() with the password or federated member: the stored PasswordCredential and FederatedCredential of UserAgentPrompt.Origin that match the request. When CredentialChooserPrompt.Mediation is CredentialMediationRequirement.Silent, the backend must not show anything: it returns the only matching credential or null. The default implementation returns null: there is no stored credential (or the user dismissed the chooser).

public virtual ValueTask<Credential?> ChooseCredentialAsync(CredentialChooserPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt CredentialChooserPrompt
The request.
cancellationToken CancellationToken
Canceled when the request is aborted.

Returns

ValueTask<Credential?> The chosen credential, or null.

Remarks

A credential that does not match the request (another origin, a type or a provider that was not requested) is ignored.

ChooseIdentityAccountAsync(IdentityAccountChooserPrompt, CancellationToken)

UserAgentUIBackend.FedCm.cs

Asks the user to choose an account of the identity providers of navigator.credentials.get({ identity }) (https://w3c-fedid.github.io/FedCM/#create-an-identitycredential): the accounts returned by the accounts endpoints of the providers, filtered by the hints of the request. The backend returns the chosen account (IdentityAccountChoice.Select, the user signs in or signs up to the site with it), the request to sign in to another account (IdentityAccountChoice.UseOtherAccount, when IdentityAccountChooserPrompt.SupportsUseOtherAccount is true: the login page of the provider is opened, then the accounts are fetched again and the chooser is shown again), or null when the user closes the chooser (the request fails with a NetworkError). The default implementation returns null.

public virtual ValueTask<IdentityAccountChoice?> ChooseIdentityAccountAsync(IdentityAccountChooserPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt IdentityAccountChooserPrompt
The accounts and the request.
cancellationToken CancellationToken
Canceled when the request is aborted.

Returns

ValueTask<IdentityAccountChoice?> The choice of the user, or null.

Remarks

A backend can refuse to show the chooser (e.g. during a cooldown after the user dismissed it) by returning null at once.

CompletePaymentAsync(PaymentSheetPrompt, PaymentComplete, string, CancellationToken)

UserAgentUIBackend.Payments.cs

Closes the payment sheet once the page processed an accepted payment (PaymentResponse.complete(), https://w3c.github.io/payment-request/#complete-method): the backend can show the outcome to the user. The promise of complete() is resolved when the task completes. The default implementation completes at once.

public virtual ValueTask CompletePaymentAsync(PaymentSheetPrompt prompt, PaymentComplete result, string serializedData, CancellationToken cancellationToken)

Parameters

prompt PaymentSheetPrompt
The payment request, whose PaymentSheetPrompt.Response is the processed response.
result PaymentComplete
The outcome of the payment given by the page.
serializedData string
The data given by the page for the payment method, serialized to JSON (null when the page gave none).
cancellationToken CancellationToken
Canceled when the document is unloaded.

Returns

ValueTask

ConfirmIdentityProviderLoginAsync(IdentityProviderLoginPrompt, CancellationToken)

UserAgentUIBackend.FedCm.cs

Asks the user whether to sign in to an identity provider (the confirm IDP login dialog, https://w3c-fedid.github.io/FedCM/#create-an-identitycredential): the user agent expected the user to be signed in to the provider (its login status is logged in), but its accounts endpoint returned no account matching the request. When the backend returns true (the user continues), the library opens the login page of the provider in a new window (IdentityProviderLoginPrompt.LoginUrl), waits until the page calls IdentityProvider.close(), then fetches the accounts again. The default implementation returns false: the request fails with a NetworkError.

public virtual ValueTask<bool> ConfirmIdentityProviderLoginAsync(IdentityProviderLoginPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt IdentityProviderLoginPrompt
The identity provider.
cancellationToken CancellationToken
Canceled when the request is aborted.

Returns

ValueTask<bool> Whether the user continues to the login page of the provider.

HasPaymentHandlerAsync(PaymentHandlerQuery, CancellationToken)

UserAgentUIBackend.Payments.cs

Returns whether the user agent has a payment handler that can make a payment with a payment method (https://w3c.github.io/payment-request/#dfn-steps-to-check-if-a-payment-can-be-made), for PaymentRequest.canMakePayment() and PaymentRequest.show(): the payment sheet only offers the supported methods, and show() fails with a NotSupportedError when no method is supported. The default implementation returns false: no payment method is supported.

public virtual ValueTask<bool> HasPaymentHandlerAsync(PaymentHandlerQuery query, CancellationToken cancellationToken)

Parameters

query PaymentHandlerQuery
The payment method and its data.
cancellationToken CancellationToken
Canceled when the page no longer needs the answer.

Returns

ValueTask<bool> Whether the payment method is supported.

IngestPaymentMethodManifestAsync(PaymentMethodManifestRequest, CancellationToken)

UserAgentUIBackend.Payments.cs

Ingests the payment method manifest of a URL-based payment method identifier (https://w3c.github.io/payment-method-manifest/#ingest-payment-method-manifests), when a page asks whether it can make a payment with it (PaymentRequest.canMakePayment(), PaymentRequest.show()). The backend calls PaymentMethodManifestRequest.FetchAsync to fetch the manifest and the web app manifests of its default payment applications, then installs the payment handlers in a way that is specific to the user agent, and remembers the origins that can provide payment handlers for the method. As ingesting a manifest tells the owner of the payment method that the user visits the page, the default implementation fetches nothing.

public virtual ValueTask IngestPaymentMethodManifestAsync(PaymentMethodManifestRequest request, CancellationToken cancellationToken)

Parameters

request PaymentMethodManifestRequest
The payment method identifier.
cancellationToken CancellationToken
Canceled when the document is unloaded.

Returns

ValueTask

OpenDocumentPictureInPictureWindow(PictureInPictureWindowRequest)

UserAgentUIBackend.PictureInPicture.cs

Opens the Picture-in-Picture window of a document (DocumentPictureInPicture.RequestWindow), a floating top-level browsing context, and returns the size of its viewport in CSS pixels, or null when the user agent cannot open it (the request fails with a NotAllowedError). The method is synchronous: requestWindow() returns the new window at once. The size is clamped to 80% of the screen. The backend changes the size of the window and closes it later through PictureInPictureWindowRequest.Handle; the browsing context is BrowsingContext.IsDocumentPictureInPicture.

public virtual PictureInPictureWindowSize? OpenDocumentPictureInPictureWindow(PictureInPictureWindowRequest request)

Parameters

request PictureInPictureWindowRequest
The window to open.

Returns

PictureInPictureWindowSize? The size of the viewport of the window, or null when it cannot be opened.

Remarks

Unlike the prompts, opening a Picture-in-Picture window does not ask the user: the default implementation (and the user agent without a backend) opens the window at PictureInPictureWindowRequest.DefaultSize.

OpenPictureInPictureWindowAsync(PictureInPictureWindowRequest, CancellationToken)

UserAgentUIBackend.PictureInPicture.cs

Opens the Picture-in-Picture window of a video (HtmlVideoElement.RequestPictureInPicture): the backend shows the video in a floating window and returns the size of the window in CSS pixels, or null when the user agent cannot open it (the request fails with an InvalidStateError). The backend changes the size of the window and closes it later through PictureInPictureWindowRequest.Handle.

public virtual ValueTask<PictureInPictureWindowSize?> OpenPictureInPictureWindowAsync(PictureInPictureWindowRequest request, CancellationToken cancellationToken)

Parameters

request PictureInPictureWindowRequest
The window to open.
cancellationToken CancellationToken
Canceled when the page no longer needs the window (e.g. its document is unloaded).

Returns

ValueTask<PictureInPictureWindowSize?> The size of the window, or null when it cannot be opened.

Remarks

Unlike the prompts, opening a Picture-in-Picture window does not ask the user: the default implementation (and the user agent without a backend) opens the window at PictureInPictureWindowRequest.DefaultSize.

RequestDigitalCredentialAsync(DigitalCredentialPrompt, CancellationToken)

UserAgentUIBackend.DigitalCredentials.cs

Shows the digital credential chooser (https://w3c-fedid.github.io/digital-credentials/#dfn-digital-credential-chooser): the user selects a wallet and a credential that answers one of the requests of navigator.credentials.get({ digital }) (a presentation) or navigator.credentials.create({ digital }) (an issuance), and the wallet returns its response. The default implementation returns null: the user cancels, and the promise of the page is rejected with a NotAllowedError.

public virtual ValueTask<DigitalCredentialResponse?> RequestDigitalCredentialAsync(DigitalCredentialPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt DigitalCredentialPrompt
The requests.
cancellationToken CancellationToken
Canceled when the request is aborted.

Returns

ValueTask<DigitalCredentialResponse?> The response of the wallet, or null when the user cancels.

RetryPaymentAsync(PaymentSheetPrompt, CancellationToken)

UserAgentUIBackend.Payments.cs

Shows the payment sheet again so that the user fixes the errors of an accepted payment (PaymentResponse.retry(), https://w3c.github.io/payment-request/#retry-method): PaymentSheetPrompt.Errors describes the errors. Returns the new response of the user (with the same payment method), or null when they dismiss the sheet (the promise of retry() is rejected with an AbortError). While the sheet is shown, the backend can report the changes of the payer details with PaymentSheetPrompt.ChangePayerDetailsAsync. The default implementation returns null.

public virtual ValueTask<PaymentSheetResponse?> RetryPaymentAsync(PaymentSheetPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt PaymentSheetPrompt
The payment request, whose PaymentSheetPrompt.Response is the response to fix.
cancellationToken CancellationToken
Canceled when the sheet must be closed.

Returns

ValueTask<PaymentSheetResponse?> The new response of the user, or null.

ShowIdentityAutoReauthenticationAsync(IdentityAutoReauthenticationPrompt, CancellationToken)

UserAgentUIBackend.FedCm.cs

Tells the user that they are signed in again to the site with a returning account, without choosing it (the auto reauthentication, https://w3c-fedid.github.io/FedCM/#create-an-identitycredential). The backend returns false when the user cancels the reauthentication (the request fails with a NetworkError). The default implementation returns true, as does the library without backend.

public virtual ValueTask<bool> ShowIdentityAutoReauthenticationAsync(IdentityAutoReauthenticationPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt IdentityAutoReauthenticationPrompt
The returning account.
cancellationToken CancellationToken
Canceled when the request is aborted.

Returns

ValueTask<bool> Whether the reauthentication continues.

ShowIdentityCredentialErrorAsync(IdentityCredentialErrorPrompt, CancellationToken)

UserAgentUIBackend.FedCm.cs

Tells the user that the identity provider did not mint a token for the chosen account (https://w3c-fedid.github.io/FedCM/#create-an-identitycredential): the request fails with an IdentityCredentialError once the backend completes (the user acknowledged or dismissed the error). The default implementation completes at once.

public virtual ValueTask ShowIdentityCredentialErrorAsync(IdentityCredentialErrorPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt IdentityCredentialErrorPrompt
The error.
cancellationToken CancellationToken
Canceled when the request is aborted.

Returns

ValueTask A task that completes when the user closes the error.

ShowPaymentSheetAsync(PaymentSheetPrompt, CancellationToken)

UserAgentUIBackend.Payments.cs

Shows the payment sheet of a payment request (PaymentRequest.show(), https://w3c.github.io/payment-request/#show-method) and returns the response of the user once they accept the payment, or null when they dismiss the sheet (the promise of show() is rejected with an AbortError). While the sheet is shown, the backend reports the changes of the user with the methods of the prompt (PaymentSheetPrompt.ChangeShippingAddressAsync, PaymentSheetPrompt.ChangeShippingOptionAsync, PaymentSheetPrompt.ChangePaymentMethodAsync), which fire the events of the page and return the details updated by the page. The token is canceled when the page aborts the request (abort()), an update of the details fails, or the document is unloaded. The default implementation returns null.

public virtual ValueTask<PaymentSheetResponse?> ShowPaymentSheetAsync(PaymentSheetPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt PaymentSheetPrompt
The payment request.
cancellationToken CancellationToken
Canceled when the sheet must be closed.

Returns

ValueTask<PaymentSheetResponse?> The response of the user, or null.

ShowSecurePaymentConfirmationAsync(SecurePaymentConfirmationPrompt, CancellationToken)

UserAgentUIBackend.SecurePaymentConfirmation.cs

Shows the transaction dialog of Secure Payment Confirmation (PaymentRequest.show() with the secure-payment-confirmation payment method, https://w3c.github.io/secure-payment-confirmation/#sctn-transaction-confirmation-ux) and returns the choice of the user. The dialog shows the payee, the total and the payment instrument of the prompt; when the user accepts the transaction, the user agent authenticates the payment with one of the credentials of the prompt (Web Authentication, on the authenticators of WebAuthenticationOptions.Authenticators). The token is canceled when the page aborts the request (abort()) or the document is unloaded. The default implementation returns SecurePaymentConfirmationChoice.Decline.

public virtual ValueTask<SecurePaymentConfirmationChoice> ShowSecurePaymentConfirmationAsync(SecurePaymentConfirmationPrompt prompt, CancellationToken cancellationToken)

Parameters

prompt SecurePaymentConfirmationPrompt
The transaction to confirm.
cancellationToken CancellationToken
Canceled when the dialog must be closed.

Returns

ValueTask<SecurePaymentConfirmationChoice> The choice of the user.

StoreCredentialAsync(CredentialStorePrompt, CancellationToken)

UserAgentUIBackend.Credentials.cs

Asks the user whether to save a credential in the credential store of the user agent (navigator.credentials.store() of a PasswordCredential or a FederatedCredential, https://w3c.github.io/webappsec-credential-management/#algorithm-store): the backend saves it (or updates the stored credential that has the same identifier) when the user accepts. The page is not told whether the credential was saved. The default implementation saves nothing.

public virtual ValueTask<bool> StoreCredentialAsync(CredentialStorePrompt prompt, CancellationToken cancellationToken)

Parameters

prompt CredentialStorePrompt
The credential to save.
cancellationToken CancellationToken
Canceled when the page no longer waits for the answer.

Returns

ValueTask<bool> Whether the credential was saved.

ValidatePaymentMethodData(string, string)

UserAgentUIBackend.Payments.cs

Validates the data of a payment method when a PaymentRequest is constructed (https://w3c.github.io/payment-request/#dfn-steps-to-validate-payment-method-data), for the payment methods that define an additional data type: the method throws a TypeErrorException or a RangeErrorException, rethrown by the constructor, when the data is not valid. It is called synchronously, on the thread of the event loop of the window, for each payment method that has data. The default implementation accepts any data.

public virtual void ValidatePaymentMethodData(string methodIdentifier, string serializedData)

Parameters

methodIdentifier string
The payment method identifier, as given by the page.
serializedData string
The data of the payment method, serialized to JSON.