[Merge M-56] Add canMakeActivePayment() method to web payments.
canMakeActivePayment() is a proposed function on PaymentRequest object.
Proposal:
https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md
Example usage:
pr.canMakeActivePayment()
.then(result => { if (result) return pr.show(); })
.catch(error => { console.log(error); });
When canMakeActivePayment() is called, Chrome stores the website origin
and the payment methods that it's checking in memory. That's shared
across the whole browser, in global state. (Not storing this on disk, so
the user can clear this data via browser restart.) Then Chrome starts a
timer for 30 minutes. When the timer fires, Chrome removes that origin
and the payment methods that it was checking from the list. If the same
origin tries to check different payment methods within the 30 minute
window, Chrome rejects that request. If canMakeActivePayment() is
rejected, then pr.show() can still be called regardless.
Intent to implement and ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/IoIxRpn6l9g/ux1C1Cj7AQAJ
Tag review:
https://github.com/w3ctag/spec-reviews/issues/146
OWP launch tracking bug:
http://crbug.com/664619
Link to entry on the feature dashboard:
https://www.chromestatus.com/feature/5702608073261056
The feature is behind
chrome://flags/#enable-experimental-web-platform-features until it is
approved to ship.
BUG=662931, 664619
Review-Url: https://codereview.chromium.org/2467393002
Cr-Commit-Position: refs/heads/master@{#433164}
(cherry picked from commit 5132963daf4b866cc573b06ff8e84f9b6ec4534c)
Committed: https://chromium.googlesource.com/chromium/src/+/cb165c5fd06d65d0083dcd544d93672db183ae2a
Description was changed from
==========
[Merge M-56] Add canMakeActivePayment() method to web payments.
canMakeActivePayment() is a proposed function on PaymentRequest object.
Proposal:
https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md
Example usage:
pr.canMakeActivePayment()
.then(result => { if (result) return pr.show(); })
.catch(error => { console.log(error); });
When canMakeActivePayment() is called, Chrome stores the website origin
and the payment methods that it's checking in memory. That's shared
across the whole browser, in global state. (Not storing this on disk, so
the user can clear this data via browser restart.) Then Chrome starts a
timer for 30 minutes. When the timer fires, Chrome removes that origin
and the payment methods that it was checking from the list. If the same
origin tries to check different payment methods within the 30 minute
window, Chrome rejects that request. If canMakeActivePayment() is
rejected, then pr.show() can still be called regardless.
Intent to implement and ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/IoIxRpn6l9g/ux1C1Cj7...
Tag review:
https://github.com/w3ctag/spec-reviews/issues/146
OWP launch tracking bug:
http://crbug.com/664619
Link to entry on the feature dashboard:
https://www.chromestatus.com/feature/5702608073261056
The feature is behind
chrome://flags/#enable-experimental-web-platform-features until it is
approved to ship.
BUG=662931,664619
Review-Url: https://codereview.chromium.org/2467393002
Cr-Commit-Position: refs/heads/master@{#433164}
(cherry picked from commit 5132963daf4b866cc573b06ff8e84f9b6ec4534c)
==========
to
==========
[Merge M-56] Add canMakeActivePayment() method to web payments.
canMakeActivePayment() is a proposed function on PaymentRequest object.
Proposal:
https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md
Example usage:
pr.canMakeActivePayment()
.then(result => { if (result) return pr.show(); })
.catch(error => { console.log(error); });
When canMakeActivePayment() is called, Chrome stores the website origin
and the payment methods that it's checking in memory. That's shared
across the whole browser, in global state. (Not storing this on disk, so
the user can clear this data via browser restart.) Then Chrome starts a
timer for 30 minutes. When the timer fires, Chrome removes that origin
and the payment methods that it was checking from the list. If the same
origin tries to check different payment methods within the 30 minute
window, Chrome rejects that request. If canMakeActivePayment() is
rejected, then pr.show() can still be called regardless.
Intent to implement and ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/IoIxRpn6l9g/ux1C1Cj7...
Tag review:
https://github.com/w3ctag/spec-reviews/issues/146
OWP launch tracking bug:
http://crbug.com/664619
Link to entry on the feature dashboard:
https://www.chromestatus.com/feature/5702608073261056
The feature is behind
chrome://flags/#enable-experimental-web-platform-features until it is
approved to ship.
BUG=662931,664619
Review-Url: https://codereview.chromium.org/2467393002
Cr-Commit-Position: refs/heads/master@{#433164}
(cherry picked from commit 5132963daf4b866cc573b06ff8e84f9b6ec4534c)
Committed:
https://chromium.googlesource.com/chromium/src/+/cb165c5fd06d65d0083dcd544d93...
==========
please use gerrit instead
Committed patchset #1 (id:1) manually as cb165c5fd06d65d0083dcd544d93672db183ae2a (tree was closed).
Issue 2516923002: [Merge M-56] Add canMakeActivePayment() method to web payments.
(Closed)
Created 4 years, 1 month ago by please use gerrit instead
Modified 4 years, 1 month ago
Reviewers:
Base URL:
Comments: 0