Instance Property

onpaymentmethodselected

An event handler that is called when a new payment method is selected.

Declaration

attribute EventHandler onpaymentmethodselected;

Discussion

This attribute must be set to a function that accepts an events argument; for example, session.onpaymentmethodselected = function(event) {}.

The event parameter contains the paymentMethod attribute. Access it like this:

var myPaymentMethod = event.paymentMethod;

The onpaymentmethodselected function must respond by calling completePaymentMethodSelection before the 30 second timeout, after which a message appears stating that the payment could not be completed.

See Also

Handling Payment Method Updates

completePaymentMethodSelection

Completes the selection of a payment method with an update.

ApplePayPaymentMethodUpdate

Updated transaction details resulting from a change in payment method.

ApplePayPaymentMethodSelectedEvent

An event object that contains the payment method.

ApplePayPaymentMethod

A dictionary that describes an Apple Pay payment card.