Contact emails
jinho...@samsung.com, rou...@chromium.org
Spec
https://w3c.github.io/payment-handler/#changepaymentmethod-method
https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface
Summary
A payment handler can call changePaymentMethod() to indicate when the user selected a different payment method in the course of a payment flow.
Then the merchant’s payment method change event handler triggers, so the merchant can, for example, update the total based on the billing address of the payment method selected within the payment handler.
The Payment Handler API and Payment Request API changes are being shipped at the same time to allow both for the payment handler to call changePaymentMethod() and for the merchant to respond to the resulting payment method change event.
This intent is only for payment handlers to fire the payment method change event. Selecting the built-in autofill cards in the browser payment sheet will not fire this event.
Link to “Intent to Implement” blink-dev discussion
changePaymentMethod():
https://groups.google.com/a/chromium.org/d/msg/blink-dev/-ObfNnnJjLo/pPsUD8CUCAAJ
Payment method change event:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/e8Zrmy52r9w/jj4mwEz3BwAJ
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No. Payment Request API and Payment Handler API are not available on Android WebView.
Demo link
https://rsolomakhin.github.io/pr/apps/pmc/
Risks
Interoperability and Compatibility
Edge: No signals
Firefox: PaymentMethodChange implemented
Safari: PaymentMethodChange shipped
Web / Framework developers: Positive
Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.
changePaymentMethod():
https://w3c-test.org/payment-handler/change-payment-method.https.html
https://wpt.fyi/results/payment-handler/change-payment-method.https.html
Payment method change event:
https://w3c-test.org/payment-request/PaymentMethodChangeEvent/
https://w3c-test.org/payment-request/onpaymentmenthodchange-attribute.https.html
https://wpt.fyi/results/payment-request/PaymentMethodChangeEvent
https://wpt.fyi/results/payment-request/onpaymentmenthodchange-attribute.https.html
Entry on the feature dashboard
changePaymentMethod():
https://chromestatus.com/feature/5698314223747072
Payment method change event:
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMMzaWGkZK-5%2B%3DPc1_5BYjqhLuE0hO1Hih7bN9jvB01HQniFVw%40mail.gmail.com.
Payment method change event:
https://w3c-test.org/payment-request/PaymentMethodChangeEvent/
https://w3c-test.org/payment-request/onpaymentmenthodchange-attribute.https.html
https://wpt.fyi/results/payment-request/PaymentMethodChangeEvent
https://wpt.fyi/results/payment-request/onpaymentmenthodchange-attribute.https.html
Entry on the feature dashboard
changePaymentMethod():
https://chromestatus.com/feature/5698314223747072
Payment method change event:
Shipping PaymentMethodChangeEvent looks pretty safe.What about browser vendor signals for changePaymentMethod()?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f17a17ab-72da-432a-a5bd-dbb96389a027%40chromium.org.
Turns out Payment Request was ignoring --ignore-certificate-errors flag, which caused WPT tests to fail. The fix is in CQ: https://crrev.com/c/1618121
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY9SysJjgrSBqwRxu_o03w%2BdUtv0BrQUgdjvVRdbCWKW2w%40mail.gmail.com.