-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add canMakePayment() method #380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine to merge but we should add a note to the spec explaining that "supports" in the canMakePayment case may be different from "supports" in the show() case, because some implementations may only return true if there are payment credientials stored.
I'd do think "returns true" should be considered a valid algorithm for browsers that seek to provide maximum security, although the |
Thanks @rsolomakhin! @adrianba and @rsolomakhin, for clarifying "supports", probably that is best done on top of #382, which itself clarifies "supports" for show(). I can work on something, although I'm building up quite the dependency list of unmerged PRs :) |
Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IoIxRpn6l9g/ux1C1Cj7AQAJ Spec: https://w3c.github.io/browser-payment-api/#canmakepayment-method Added in: w3c/payment-request#380 BUG=664619 Review-Url: https://codereview.chromium.org/2579793003 Cr-Commit-Position: refs/heads/master@{#438995} (cherry picked from commit 6412949) Review-Url: https://codereview.chromium.org/2581683006 . Cr-Commit-Position: refs/branch-heads/2924@{#526} Cr-Branched-From: 3a87aec-refs/heads/master@{#433059}
There is an unacceptable risk to the user's privacy here @rsolomakhin so a browser that wishes to protect the user's privacy must prevent There are two heavy handed ways browsers could do this, either disable the payments API all together, or disable all payment methods except one the Browser vender chooses, ala the Brave project's in-browser payments. Instead, we should provide a less heavy handed route whereby a browser can effectively disable
|
@burdges I think several of your suggestions are already implemented by https://w3c.github.io/browser-payment-api/#canmakepayment-method :
I don't think your 1 is a good idea, as asking if you can make a payment should not show a payment; that defeats the purpose of the API. |
I missed this conversation over "supports", sounds good. |
This closes #310, and closes #316 (which it is roughly based on), and closes #367 by intentionally allowing user agent leeway in restricting repeated calls to canMakePayment().
The main difference from #316 is in allowing user agents maximum flexibility in protecting against fingerprinting, instead of trying to prescribe an algorithm for doing so. It also contains a number of fixes to the algorithm.