-
Notifications
You must be signed in to change notification settings - Fork 42
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
Indicate to the payment handler whether the user agent showed payment sheet? #250
Comments
Hi @rsolomakhin, I think that might be useful information. For example, suppose I could configure my payment app so that payments under a certain amount happen automatically. Furthermore, the payment app is launched automatically without showing the sheet. This means that I make a payment simply by clicking on the Buy button. On the one hand, this might be useful for streamlining some types of payments. On the other hand, a payment app may need to enforce a user consent model where there is at least one explicit user action. Perhaps selection of the payment app in the sheet suffices as an explicit user action, so the payment handler does not need to prompt the user further. But if the sheet does not include a user action, the perhaps the payment handler needs to require it. So it might be helpful for the payment handler to know whether a user action has already taken place. Ian |
@rsolomakhin First, two preliminary questions:
As to your "interesting point", do you envision that the precedence order is one-way (i.e., the browser is in control but can cede control to the payment app under certain conditions) and therefore that the user's browser preferences take precedence over the user's per-app preferences? If not, it seems that we'd need more robust communication between the browser and the payment apps to handle various scenarios of the kind that @ianbjacobs has outlined (e.g., configure a payment app "so that payments under a certain amount happen automatically" - the browser would need to know this and potentially also adjudicate among competing "claims" from multiple payment apps, which seems like a recipe for code complexity and user confusion). |
This feels like we will cover a lot of the same ground as when we discussed #173 so may be worth reading over that too |
Neither. It's URL-based payment method identifiers, such as
It's a single PMI and it's URL-based.
Correct. The browser is in control. The payment app can decide whether to open its own HTML page via
Chrome does not skip the payment sheet if multiple payment apps are installed for the PMI. Then the user would be given the choice of payment apps in the browser payment sheet in every PaymentRequest. |
I also thought of the #173 discussion but I don't think it's the same set of issues. I think 173 is about the display and communication of default instruments, whereas the current proposal implies there is no display (and thus no user selection). The payment handler is launched automatically. Ian |
Some background: On the one hand, In Chrome we sometimes skip the payment sheet and go directly to the payment app when a number of conditions are met, some of which are, for example:
On the other hand, I've seen PayPal skip their flow for one of my purchases today, because I explicitly enabled this option in my settings. I stayed on the merchant website throughout the purchase.
Now, the interesting point: a payment handler may want to either skip or show their own flow based in part on whether the user agent showed or skipped its payment sheet.
Therefore, my question: Would it be useful for the user agent to indicate to the payment handler whether the payment sheet was skipped?
cc: @anthonyvd @gogerald @DurgaTheHutt
The text was updated successfully, but these errors were encountered: