Class PaymentMethodChangeEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The PaymentMethodChangeEvent interface of the Payment Request API describes the PaymentRequestpaymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using Apple Pay).
[Value("PaymentMethodChangeEvent")]
public class PaymentMethodChangeEvent : PaymentRequestUpdateEvent
- Inheritance
-
PaymentMethodChangeEvent
- Inherited Members
Remarks
Constructors
PaymentMethodChangeEvent()
public PaymentMethodChangeEvent()
PaymentMethodChangeEvent(string, PaymentMethodChangeEventInit)
The PaymentMethodChangeEvent()
constructor creates a new PaymentMethodChangeEvent object providing
details about a PaymentRequest.Paymentmethodchange event.
public PaymentMethodChangeEvent(string type, PaymentMethodChangeEventInit eventInitDict = null)
Parameters
typestringeventInitDictPaymentMethodChangeEventInit
Remarks
Properties
MethodDetails
The read-only methodDetails property of the PaymentMethodChangeEvent interface is an object
containing any data the payment handler may provide to describe the change the user
has made to their payment method. The value is null if no details
are available.
[Value("methodDetails")]
public Object? MethodDetails { get; }
Property Value
- Object
An object containing any data needed to describe the changes made to the payment
method. The contents vary depending on the actual payment method chosen, so you will
need to refer to the MethodName
property first, then interpret themethodDetailsafter that.The default value isnull, indicating that no additional details are
available.
Remarks
MethodName
The read-only methodName property of the PaymentMethodChangeEvent interface is a string which
uniquely identifies the payment handler currently selected by the user. The
payment handler may be a payment technology, such as Apple Pay or Android Pay, and each
payment handler may support multiple payment methods; changes to the payment method
within the payment handler are described by the PaymentMethodChangeEvent.
[Value("methodName")]
public string MethodName { get; }
Property Value
- string
A string which uniquely identifies the currently-selected payment
handler. This may be a string chosen from the list of standardized payment method
identifiers, or a URL used by the payment processing service. See
Payment method identifiers for more information.The default value is the empty string,"".