New issue
Advanced search Search tips

Issue 877644 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

canMakePayment() should return true for JIT installable payment handlers.

Project Member Reported by rouslan@chromium.org, Aug 24

Issue description

If a payment handler is not installed, but is available for installation Just-In-Time, then PaymentRequest.canMakePayment() should return "true".
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 27

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

commit 8cf54bd67de7eb5cead851257d32acc8c674913e
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Mon Aug 27 14:17:46 2018

[Payment Handler] canMakePayment() is true for JIT install.

Before this patch, if the only method of payment available was a payment
handler that is not yet installed, but is available or installation
Just-In-Time (JIT), then PaymentRequest.canMakePayment() would return
"false". This prevented JIT installable payment handler usage by
merchants that don't call PaymentRequest.show() unless
PaymentRequest.canMakePayment() returns true.

This patch makes canMakePayment() return "true" for JIT installable
payment handlers on both desktop and Android. (iOS does not support
payment handlers at this point.)

After this patch, if the only method of payment available is a payment
handler that is not yet installed, but is available for JIT
installation, then PaymentRequest.canMakePayment() would return "true".

Bug:  877644 
Change-Id: I614a02789b514d5d0e7738ca827178a844e74199
Reviewed-on: https://chromium-review.googlesource.com/1188900
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586252}
[modify] https://crrev.com/8cf54bd67de7eb5cead851257d32acc8c674913e/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
[modify] https://crrev.com/8cf54bd67de7eb5cead851257d32acc8c674913e/components/payments/content/service_worker_payment_instrument.cc

Status: Fixed (was: Assigned)
To verify the fix:

1) Make sure that chrome://flags/#just-in-time-service-worker-payment-app is set to  "Enabled" and restart Chrome, if necessary.

2) Uninstall BobPay payment handler. You can do this by making sure that "https://bobpay.xyz/" says "Install BobPay Web Payment App", which indicates that the payment handler is not installed. If the page says "Uninstall BobPay Web Payment App" instead, then click that link to perform the uninstall.

3) Verify that https://rsolomakhin.github.io/pr/bob/ says "Can make payment" in green text. (Before this patch, the page used to say "Cannot make payment."

The change should be verified on one desktop platform (e.g., Mac) and one Android device, because the code path is slightly different.
Cc: jmukthavaram@chromium.org
Labels: TE-Verified-M70 TE-Verified-70.0.3535.0
Tested this issue on Windows 10, Mac 10.13.6 & Debian Rodate using chrome reported version-70.0.3530.0 & chrome canary-70.0.3535.0 as per C#2.

Followed same steps and able to reproduce the issue on reported version and seems issue got fixed in latest canary. '"Can make payment" text is seen in green color.

As it is working as intended, adding TE Verified labels.

please find the attached screencast for reference.
Thanks..!
877644-Reported -70.0.3530.0.mp4
978 KB View Download
877644-Fixed version-70.0.3535.0.mp4
1.7 MB View Download

Sign in to add a comment