- From: Stephen McGruer <notifications@github.com>
- Date: Thu, 06 May 2021 08:16:59 -0700
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 6 May 2021 15:17:17 UTC
I don't believe we can remove `modifiers`. Google Pay currently uses the `modifiers` to pass transaction details, and to handle updates from the merchant if something changes (e.g. the user changes the shipping address). This is done via the `onpaymentmethodchange` callback, and the `updateWith` method on the `PaymentMethodChangeEvent` it passes. You can see this via this test page https://output.jsbin.com/xotoxog (which is a copy of https://developers.google.com/pay/api/web/guides/resources/demos#dynamic-price-update-example). If one examines `pay.js` and looks for `modifiers`, you'll find the code using them. Dropping a breakpoint into the pretty-printed source and playing with the demo, I saw: Initial clicking of button: ![image](https://user-images.githubusercontent.com/153264/117322847-60408f00-ae5c-11eb-94ec-2c7e19a97d81.png) Updating the shipping method: ![image](https://user-images.githubusercontent.com/153264/117322913-6e8eab00-ae5c-11eb-93f0-ea08e6b39e4c.png) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/payment-request/pull/957#issuecomment-833605867
Received on Thursday, 6 May 2021 15:17:17 UTC