New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 771323 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Two supported origins for Android payment apps

Project Member Reported by rouslan@chromium.org, Oct 3 2017

Issue description

Reported in the field: if a payment method supports Android payment apps from two origins, then only one of these apps will show up at a time. Which app shows up is not deterministic.
 
Cc: ryan.wat...@mastercard.com
Status: Started (was: Unconfirmed)
The problem turned out to be "skip UI" feature triggering. Fix incoming.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fd3aab702c43dd3c33d958e29e0285fec7ad8f40

commit fd3aab702c43dd3c33d958e29e0285fec7ad8f40
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Tue Oct 10 16:22:16 2017

[Payments] Don't skip UI if more than one app is installed.

Before this patch, a PaymentRequest with a single URL-based payment
method identifier and no other options would skip the browser payment
sheet UI and launch into the first payment app available, even if the
device had multiple apps that could handle this request.

This patch adds a check for the number of installed apps. If it's more
than one, then the browser shows the payment sheet UI. If it's exactly
one and PaymentRequest was created with a single URL-based payment
method identifier with no other options, then the browser launches the
single payment app directly.

After this patch, if the device has multiple apps that can handle the
same PaymentRequest, then all of these apps are shown to the user for
selection.

Note that the "Loading..." spinner is not shown with a single URL-based
payment method identifier and no other options until the app scan is
complete to accommodate the requirement for omitting the spinner when
launching into the payment app directly, if only one payment app is
installed.

Bug:  771323 
Change-Id: Icd69386ce19c15da4a67ab2b089db4b0023f5257
Reviewed-on: https://chromium-review.googlesource.com/705279
Reviewed-by: Mathieu Perreault <mathp@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507684}
[modify] https://crrev.com/fd3aab702c43dd3c33d958e29e0285fec7ad8f40/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/fd3aab702c43dd3c33d958e29e0285fec7ad8f40/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppUiSkipPreloadTest.java
[modify] https://crrev.com/fd3aab702c43dd3c33d958e29e0285fec7ad8f40/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppUiSkipTest.java

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2285ab6f2fae7bf18759c1899058fcc774866efe

commit 2285ab6f2fae7bf18759c1899058fcc774866efe
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Tue Oct 10 17:50:43 2017

[Payments] Cache supported methods correctly.

Before this patch, Chrome stored array serializations like in
"[https://example.com]" in cache of "supported_origins" where URLs like
"https://example.com" was expected, causing the cache to be discarded on
every use where "supported_origins" was a list of origins. Thus Chrome
could not reap the speed benefits of caching, if "supported_origins"
contained a list of origins.

This patch changes Chrome to write each URL from "supported_origins" in
cache instead of the array serialization.

After this patch, Chrome correctly stores URLs like
"https://example.com" in cache of "supported_origins" and thus enjoys
the speed benefits of caching when "supported_origins" contains a list
of origins.

Bug:  771323 
Change-Id: Ia46c421c87b079a22acf8b0bac061cad66773f8f
Reviewed-on: https://chromium-review.googlesource.com/705654
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Mathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507708}
[modify] https://crrev.com/2285ab6f2fae7bf18759c1899058fcc774866efe/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentManifestVerifier.java

Status: Fixed (was: Started)

Sign in to add a comment