#
PaymentRequestEvent
#
The events that can be invoked on payment methods that take a PaymentRequest object
Values
- shippingcontactchanged String#
Occurs when the buyer chooses a shipping address. Subscribe to this event in order to update the payment request when the shipping address changes.
req.addEventListener('shippingcontactchanged', (contact) => { const lineItems = [ ... ] const shippingLineItems = [ ... ] const taxLineItems = [ ... ] const total = { ... } return { lineItems, shippingLineItems, taxLineItems, total }; })
- shippingoptionchanged String#
Occurs when the buyer chooses a shipping option. Subscribe to this event in order to update the payment request when the shipping option changes.
req.addEventListener('shippingoptionchanged', (option) => { const lineItems = [ ... ] const shippingLineItems = [ ... ] const taxLineItems = [ ... ] const total = { ... } return { lineItems, shippingLineItems, taxLineItems, total }; })