Skip to content
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

Remove PaymentInstruments API #409

Merged
merged 5 commits into from
Jan 25, 2023
Merged

Conversation

rsolomakhin
Copy link
Collaborator

@rsolomakhin rsolomakhin commented Jan 25, 2023

PaymentInstruments is the Web API that backs non-JIT install of payment apps. It was designed with the assumption that the browser would store the actual payment instrument details, which has not turned out to be true, and has some privacy leaks. This patch removes the ability to register a payment handler via paymentManager.instruments API. Only just-in-time installation is supported from now on.

Chrome tracking bug: https://crbug.com/1327265
Chrome status: https://chromestatus.com/feature/5099285054488576

Overview of changes in the patch:

  • Remove PaymentInstruments interface.
  • Remove no longer used PaymentInstrument and ImageOjbect dictionaries.
  • Mark PaymentManager exposed only on Window (not Worker) to match the Chrome implementation.
  • Add a definition for "payer" for symmetry with "payee" definition.
  • Soften the language around the purpose for the "canmakepayment" event to match Chrome implementation, where it is being used for hasEnrolledInstrument() instead of canMakePayment() and show().
  • Add a promise to the "canmakepayment" example to reduce confusion stemmed from many examples that always unconditionally return "true".
  • Remove the unused PaymentRequestEvent.fetchedImage internal slot.
  • Raise 2nd level sections to 1st level for clarity.

Closes: #371
Closes: #381


Preview | Diff

PaymentInstruments is the Web API that backs non-JIT install of payment
apps. It was designed with the assumption that the browser would store
the actual payment instrument details, which has not turned out to be
true, and has some privacy leaks. This patch removes the ability to
register a payment handler via paymentManager.instruments API. Only
just-in-time installation is supported from now on.

Chrome tracking bug: https://crbug.com/1327265
Chrome status: https://chromestatus.com/feature/5099285054488576

Overview of changes in the patch:
 * Remove PaymentInstruments interface.
 * Remove no longer used PaymentInstrument and ImageOjbect dictionaries.
 * Mark PaymentManager exposed only on Window (not Worker) to match the
   Chrome implementation.
 * Add a definition for "payer" for symmetry with "payee" definition.
 * Soften the language around the purpose for the "canmakepayment"
   event to match Chrome implementation, where it is being used for
   hasEnrolledInstrument() instead of canMakePayment() and show().
 * Add a promise to the "canmakepayment" example to reduce confusion
   stemmed from many examples that always unconditionally return "true".
 * Raise 2nd level sections to 1st level for clarity.
 * Remove the unused PaymentRequestEvent.fetchedImage internal slot.
@rsolomakhin
Copy link
Collaborator Author

@ianbjacobs & @stephenmcgruer: Please take a look.

@ianbjacobs
Copy link
Contributor

@rsolomakhin, one observation is that removing the PaymentInstruments interface should close a couple of other issues, namely #371 and maybe #381.

index.html Outdated Show resolved Hide resolved
@rsolomakhin
Copy link
Collaborator Author

@rsolomakhin, one observation is that removing the PaymentInstruments interface should close a couple of other issues, namely #371 and maybe #381.

Good point! I've added these to the description of the pull request.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Show resolved Hide resolved
rsolomakhin and others added 3 commits January 25, 2023 11:06
Co-authored-by: Stephen McGruer <[email protected]>
Co-authored-by: Stephen McGruer <[email protected]>
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.

Payment Instrument architecture clarification Remove "instrument" concept from PaymentManager
3 participants