Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The PaymentMethodChangeEvent()
constructor creates a new PaymentMethodChangeEvent
object providing details about a paymentmethodchange
event.
paymentMethodChangeEvent = new PaymentMethodChangeEvent(type, options);
type
DOMString
which must contain the string paymentmethodchange
, the name of the only type of event which uses the PaymentMethodChangeEvent
interface.options
Optional
An optional PaymentMethodChangeEventInit
dictionary which may contain zero or more of the following properties:
methodName
Optional
DOMString
containing the payment method identifier for the payment handler being used. This is an empty string by default.methodDetails
Optional
null
if there is no additional information available or required. This is null
by default.A newly-created PaymentMethodChangeEvent
object describing a change to the options specified for the payment method given in the methodName
property.
The type of the methodDetails
property depends on the payment method. For example, if methodName
is basic-card
, indicating that the basic card payment method is being used for validation, the methodDetails
field must be a BasicCardChangeDetails
object.
Specification | Status | Comment |
---|---|---|
Payment Request API The definition of 'PaymentMethodChangeEvent()' in that specification. | Candidate Recommendation | Initial definition. |
No compatibility data found. Please contribute data for "api.MerchantValidationEvent.PaymentMethodChangeEvent" (depth: 1) to the MDN compatibility data repository.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PaymentMethodChangeEvent/PaymentMethodChangeEvent