[Payment] Enforce full delegation (behind a flag)
Context: When the merchant send a PaymentRequest to the browser, the merchant specifies what additional information (shipping, payer name/email/phone) it requests. On the payment apps side, payment apps specify which delegations they support. The browser as a middleman compares the requested information from the merchant and the supported delegations from the payment apps and decides which payment app can supports all requested delegations (aka full delegation), which app can support only part of the delegations (aka partial delegation). Before: For those partial delegations, the browser used to prompt users to input shipping addresses or contact info. After: * When the feature EnforceFullDelegation is enabled, for those apps with partial delegations, the browser will treat them as invalid apps - hiding them from the payment app list in the payment sheet. This applies for both Android payment apps and sw payment apps. For Android payment apps, an error will be logged in logcat; for SW payment apps, no error message would be logged yet (crbug.com/1100656). * Although the flag is default to disabled, the Android Apps that support the play billing method will be treated like the full delegation is enforced. * When disabled, the old behaviour remains. Affected: Android Payment Apps, Service Worker Payment Apps Change: * Add a flag: EnforceFullDelegation (default to disabled) * payment apps with the app store billing methods bypasses the flag with the enforcement behaviours. * Not to show a Android or SW Payment Apps in the payment sheet when the app does not support full delegation. Bug: 1095821, 1103695 Change-Id: I99023ed3383b53b5e3c006925b3f4cd032808e0f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2260956Reviewed-by:Sahel Sharify <sahel@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#790066}
Showing
Please register or sign in to comment