PaymentMethodManifest Class
A parsed payment method manifest (https://w3c.github.io/payment-method-manifest/#parsed-payment-method-manifest): the web app manifests of the default payment applications of a payment method, and the origins whose payment handlers can handle the payment method.
public sealed class PaymentMethodManifestProperties
| Name | Description |
|---|---|
| DefaultApplications | Gets the URLs of the web app manifests of the default payment applications (https: URLs, without duplicates). |
| SupportedOrigins | Gets the serializations of the origins whose payment handlers can handle the payment method (https: origins, without duplicates). |
DefaultApplications
PaymentMethodManifest.csGets the URLs of the web app manifests of the default payment applications (https: URLs, without duplicates).
public IReadOnlyList<string> DefaultApplications { get; }Property value
SupportedOrigins
PaymentMethodManifest.csGets the serializations of the origins whose payment handlers can handle the payment method (https: origins, without duplicates).
public IReadOnlyList<string> SupportedOrigins { get; }Property value
Methods
| Name | Description |
|---|---|
| Parse(ReadOnlySpan<byte>, string) | Validates and parses a payment method manifest (https://w3c.github.io/payment-method-manifest/#validate-and-parse): returns null when the content is not a JSON object, or when its default_applications or supported_origins member is not a non-empty array of valid URLs (https: URLs, relative to url, for the applications; https: origins for the supported origins). The other members are ignored. |
Parse(ReadOnlySpan<byte>, string)
PaymentMethodManifest.csValidates and parses a payment method manifest (https://w3c.github.io/payment-method-manifest/#validate-and-parse): returns null when the content is not a JSON object, or when its default_applications or supported_origins member is not a non-empty array of valid URLs (https: URLs, relative to url, for the applications; https: origins for the supported origins). The other members are ignored.
public static PaymentMethodManifest? Parse(ReadOnlySpan<byte> content, string url)Parameters
contentReadOnlySpan<byte>- The content of the manifest, encoded as UTF-8.
urlstring- The URL of the manifest, against which the URLs of the applications are resolved.
Returns
Exceptions
ArgumentExceptionurlis not an absolute URL.