The following changes are coming to Chrome 77.
Canary: today | Beta: August 8, 2019 | Stable: September 10, 2019
Changes enabled by default:
Improved debuggability of Payment Request API
Deprecated card issuer networks as payment method identifiers
Deprecated legacy support for invalid basic-card data
Changes available for testing behind flags:
Payment handler event logging in Dev Tools
Expanded availability of just-in-time installation of payment handlers
Chrome 77 returns more detailed error messages on all rejected Promises and adds the ability to log payment handler events in Dev Tools.
The new error messages are designed to pinpoint the exact reason why PaymentRequest.show() fails to complete. For example:
Another PaymentRequest UI is already showing in a different tab or window.
Cannot show PaymentRequest UI in a background tab.
Not in a secure origin.
SSL certificate is not valid.
User closed the Payment Request UI.
To print the detailed error message, do this:
Card issuer networks (e.g. “visa”, “mastercard”, “amex”) have not been recognized as valid payment method identifiers by W3C since 2017. Chrome 77 removed the legacy bridge code that automatically translated such requests into the equivalent basic-card request.
Web developers should use supportedNetworks from the Basic Card Payment Method:
For more information, see https://www.chromestatus.com/feature/5725727580225536.
Chrome 77 tightens input validation and throws a TypeError if the PaymentMethodData.data provided on a basic-card request cannot be converted into a BasicCardRequest. Our telemetry shows that real-world triggers of this exception is very rare. Affected web developers should update their code to use well-formed requests.
For more information, see https://www.chromestatus.com/feature/4793925806063616.
Developer console can now display payment handler events for easier debugging. To try out this feature:
Enable chrome://flags/#enable-devtools-experiments. Then restart the browser.
In dev tools, press F1 to open dev tools settings.
Under “Experiments”, enable “Background services section for Payment Handler”.
Close and re-open dev tools.
To log events on a live page (e.g. https://rsolomakhin.github.io/pr/bob/):
Open dev tools.
In “Application” tab, select “Payment Handler” from the “Background Services” section.
Select the checkbox for “Show events from other domains”.
Click the record button.
Just-in-time installation of payment handlers is a Chrome optimization launched in Chrome 70 to improve the discovery of new payment handlers. Until now, it is only available if the payment request specifies a single payment method and this payment method is a URL-based payment method. Chrome 77 expands just-in-time installation to all URL-based payment methods specified in a payment request.
To test this feature:
Enable chrome://flags#enable-web-payments-experimental-features.
Click “Buy”
You should see BobPay as an available payment method in addition to basic-card.