8000 [Spec] Introduce additional output states by stephenmcgruer · Pull Request #292 · w3c/secure-payment-confirmation · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Spec] Introduce additional output states #292

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

Merged
merged 5 commits into from
May 22, 2025

Conversation

stephenmcgruer
Copy link
Collaborator
@stephenmcgruer stephenmcgruer commented May 6, 2025

This change expands the possible outcomes from the transaction confirmation experience, to include the ability for the user to explicitly indicate that they do NOT want to continue with the current payment. To achieve this in a privacy-compliant way, this changes SPC behavior to always display the transaction confirmation UX, whether or not any credentials matched.

The possible outcomes of SPC are now:

  1. A signed cryptogram returned - user wishes to proceed with payment and has successfully verified their identity
  2. NotAllowedError - user wishes to proceed with payment but either cannot OR does not want to use the passed-in credentials to do that
  3. AbortError - user explicitly does not wish to continue with payment. The integrator should return to merchant checkout screen or handle otherwise sensibly.
  4. OptOutError - as today, the user wishes for the RP to remove this credential.

Fixes #275

Tasks:

  • Chromium bug for implementation
  • Chromium bug for updating WebDriver implementation - https://crbug.com/417426346
  • WPT tests added/updated

Preview | Diff

Base automatically changed from smcgruer-unnest4-1 to main May 6, 2025 16:31
@stephenmcgruer stephenmcgruer force-pushed the smcgruer-moreOutputStates branch from 71b6198 to 4f60e9b Compare May 6, 2025 16:31
@stephenmcgruer stephenmcgruer marked this pull request as ready for review May 8, 2025 13:17
@stephenmcgruer stephenmcgruer requested review from pejic and ianbjacobs May 8, 2025 13:17
@stephenmcgruer
Copy link
Collaborator Author

Note: I don't like the name autoVerifyAnotherWay for the automation enum, so very open to bikeshedding there.

:: Reject the {{PaymentRequest/show|PaymentRequest.show()}} with an
"{{OptOutError}}" {{DOMException}}. See [[#sctn-user-opt-out]].

Note: This option only has to be available to the user if
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is showing opt allowed when showOptOut is not set or false?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So currently it is allowed for a user agent to show the opt out option even if showOptOut is set to false / not set:

https://w3c.github.io/secure-payment-confirmation/#sctn-transaction-confirmation-ux

If showOptOut is true, the user agent MUST give the user the opportunity to indicate that they want to opt out of the process for the given relying party. If the user indicates that they wish to opt-out, then the user agent must reject the show() promise with an "OptOutError" DOMException. See § 11.5 User opt out.

This was mostly accidental due to how things were worded (i.e., it's not specified that they cannot show this option if showOptOut is not true), but it's how things are. It's reasonable to change that behavior, but I think it should go in a follow-up spec PR discussed separately?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's followup separately.

This change expands the possible outcomes from the transaction confirmation
experience, to include the ability for the user to explicitly indicate that
they do *NOT* want to continue with the current payment. To achieve this
in a privacy-compliant way, this changes SPC behavior to *always* display
the transaction confirmation UX, whether or not any credentials matched.

The possible outcomes of SPC are now:

1. A signed cryptogram returned - user wishes to proceed with payment and has
   successfully verified their identity
2. NotAllowedError - user wishes to proceed with payment but either cannot OR
   does not want to use the passed-in credentials to do that
3. AbortError - user explicitly does not wish to continue with payment. The
   integrator should return to merchant checkout screen or handle otherwise
   sensibly.
4. OptOutError - as today, the user wishes for the RP to remove this credential.

Fixes #275
@stephenmcgruer stephenmcgruer force-pushed the smcgruer-moreOutputStates branch from d705a22 to f03caa0 Compare < 8000 a href="#event-17619921465" data-view-component="true" class="css-truncate css-truncate-target Link--secondary Link">May 12, 2025 16:19
Copy link
Collaborator
@ianbjacobs ianbjacobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a high level, looks good!

@stephenmcgruer stephenmcgruer requested a review from pejic May 12, 2025 17:32
:: Reject the {{PaymentRequest/show|PaymentRequest.show()}} with an
"{{OptOutError}}" {{DOMException}}. See [[#sctn-user-opt-out]].

Note: This option only has to be available to the user if
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's followup separately.

@stephenmcgruer
Copy link
Collaborator Author

Plan is to discuss this PR in the May 22nd WPWG call, and assuming no concerns, merge it.

@stephenmcgruer stephenmcgruer merged commit 64ca553 into main May 22, 2025
3 checks passed
@stephenmcgruer stephenmcgruer deleted the smcgruer-moreOutputStates branch May 22, 2025 14:09
@stephenmcgruer
Copy link
Collaborator Author

Discussed on May 22nd call, no concerns raised, landing PR.

github-actions bot added a commit that referenced this pull request May 22, 2025
SHA: 64ca553
Reason: push, by stephenmcgruer

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request May 22, 2025
SHA: 64ca553
Reason: push, by stephenmcgruer

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Expanding output states for SPC
3 participants
0