PaymentSheetResponse Class
The response of the user who accepts a payment in the payment sheet (https://w3c.github.io/payment-request/#user-accepts-the-payment-request-algorithm), returned by UserAgentUIBackend.ShowPaymentSheetAsync and UserAgentUIBackend.RetryPaymentAsync: it becomes the PaymentResponse of the page.
public sealed class PaymentSheetResponseConstructors
| Name | Description |
|---|---|
| PaymentSheetResponse() |
PaymentSheetResponse()
PaymentSheetPrompt.cs- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public PaymentSheetResponse()No documentation is available.
Properties
| Name | Description |
|---|---|
| Details | Gets the response of the payment handler, serialized to JSON (https://w3c.github.io/payment-request/#dom-paymentresponse-details): a JSON object whose shape is defined by the payment method. A text that is not JSON is an internal error of the payment handler: the promise of the page is rejected with an OperationError. |
| MethodName | Gets the identifier of the payment method that the user selected (one of PaymentSheetPrompt.Methods). |
| PayerEmail | Gets the email address of the payer (used when the request requests it), or null. |
| PayerName | Gets the name of the payer (used when the request requests it), or null. |
| PayerPhone | Gets the phone number of the payer, formatted as E.164 (used when the request requests it), or null. |
| ShippingAddress | Gets the full shipping address chosen by the user when the request requests shipping, or null to use the last address given to PaymentSheetPrompt.ChangeShippingAddressAsync. A request that requests shipping is accepted only with a shipping address and a shipping option (PaymentSheetPrompt.ShippingOption): otherwise the user aborts the payment request. |
Details
PaymentSheetPrompt.csGets the response of the payment handler, serialized to JSON (https://w3c.github.io/payment-request/#dom-paymentresponse-details): a JSON object whose shape is defined by the payment method. A text that is not JSON is an internal error of the payment handler: the promise of the page is rejected with an OperationError.
public string Details { get; init; }Property value
MethodName
PaymentSheetPrompt.csGets the identifier of the payment method that the user selected (one of PaymentSheetPrompt.Methods).
public required string MethodName { get; init; }Property value
PayerEmail
PaymentSheetPrompt.csPayerName
PaymentSheetPrompt.csPayerPhone
PaymentSheetPrompt.csShippingAddress
PaymentSheetPrompt.csGets the full shipping address chosen by the user when the request requests shipping, or null to use the last address given to PaymentSheetPrompt.ChangeShippingAddressAsync. A request that requests shipping is accepted only with a shipping address and a shipping option (PaymentSheetPrompt.ShippingOption): otherwise the user aborts the payment request.
public ContactAddress? ShippingAddress { get; init; }