From 8d58055f551c80183d94450e5e6dbfbdd99472f2 Mon Sep 17 00:00:00 2001
From: Ian Jacobs The user agent may offer features to facilitate selection (e.g., launch a chosen payment app every time the user wants to pay at a given Web site); those features lie outside the scope of this specification. For the display of recommended payment apps: For the display of recommended payment apps:General Considerations
Decoupling and Trust
From b852c8a5d6ad63e7799f8e305d57770a4f7b7105 Mon Sep 17 00:00:00 2001
From: Ian Jacobs
@@ -397,7 +397,7 @@
@@ -414,7 +414,7 @@ Payment App Identification
Payment App Matching
Selectable App Information Display
-
From 9dbafcf49dd8ffdcfb9c8ef4f6aa6ea06148af61 Mon Sep 17 00:00:00 2001
From: Ian Jacobs Payment App Request Data
total
field of the PaymentDetails
provided
when the corresponding PaymentRequest object was instantiated.
+ modifiers
attributePaymentDetailsModifier
dictionaries
From 50d5bb25534b78b6a69544b49797ab85d2133461 Mon Sep 17 00:00:00 2001
From: Ian Jacobs General Considerations
Decoupling and Trust
@@ -397,7 +397,7 @@
@@ -1048,7 +1048,7 @@ Payment App Identification
Selectable App Information Display
-
From 7553f82cd9c45fe38e04f08efc2aaf9c79ad4f1f Mon Sep 17 00:00:00 2001
From: Ian Jacobs Payment App Response
PaymentRequest.show()
.
+ See issue 37 for discussion of payment app cancellation and also resulting user agent behavior. At the 23 November 2016 payment apps task force meeting, there was consensus that in case of payment app failure or cancelation, the user agent should not be prohibited from offering the user alternative matching payment apps.
+The following example shows how to respond to a payment request:
paymentRequestEvent.respondWith(new Promise(function(accept,reject) { @@ -1538,8 +1541,7 @@Payment App Response
Some payment methods might require a back channel to guarantee payment - response delivery (especially push payment methods). Should it be part - of the generic portion of paymentRequest and paymentResponse? [Ed Note: + response delivery (especially push payment methods). See issue 224. [Ed Note: the "complete()" attribute of the "PaymentResponse" interface would serve this purpose quite cleanly.]
From 2802cb0b716dcb2dde29d95bdf5c4f14f15dc08e Mon Sep 17 00:00:00 2001 From: Ian JacobsDate: Thu, 1 Dec 2016 13:42:30 -0600 Subject: [PATCH 6/8] Update manifest data for consistent with Web App Manifest - Per discussion 30 Nov 2016 [1], alignment of manifest members with Web App Manifest, a link to issue 69, and a note about needing further discussion about the alignment. [1] https://www.w3.org/2016/11/30-apps-minutes#item03 --- index.html | 77 ++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/index.html b/index.html index 257addf..d506df9 100644 --- a/index.html +++ b/index.html @@ -753,8 +753,8 @@
Register the payment app with the user agent for future use, - associating manifest's label
and -icon
set with the payment app for user reference. + associating manifest'sname
and +icons
set with the payment app for user reference.For each PaymentAppOption present in the @@ -763,7 +763,7 @@
Add a new payment option to the payment app's registration, associating it with the PaymentAppOption - label
andicon
fields. +name
andicons
fields.For each payment method indicated in the @@ -826,30 +826,24 @@ @@ -861,10 +861,6 @@
PaymentAppManifest interface
+Issue 69: The Payment Apps Task Force has a goal of alignment with the draft Web App Manifest specification for data used to display payment app and options for selection by the user. More work is necessary to determine whether the Payment App API should reference (part of) the Web App Manifest specification, import definitions while that specification remains a draft, or define new terms.
dictionary PaymentAppManifest { - DOMString label; - DOMString? icon; - sequence<PaymentAppOption> options; + required DOMString name; + sequence<ImageObject> icons; + required sequence<PaymentAppOption> options; };-
- +
label
membername
member- - The
-label
member is a string that represents the + Thename
member is a string that represents the label for this payment app as it is usually displayed to the user.- +
icon
membericons
member- - The
-icon
member defines an icon for this - payment app as it is usually displayed to the user. -- - Need to define how an icon would be represented in this data. - Url? Data URL? Size options? Web - App Manifest may be used for inspiration. + The
icons
member is an array of image objects that can serve as iconic representations of the payment app when presented to the user for selection.options
member- @@ -880,26 +874,24 @@
dictionary PaymentAppOption { - DOMString label; - DOMString? icon; - DOMString id; + required DOMString name; + sequence<ImageObjects> icons; + required DOMString id; sequence<DOMString> enabledMethods; };--
- -
label
member- - The
label
member is a string that represents the - label for this option as it is usually displayed to the user - when selecting a payment app. ++
- +
name
member- + The
-name
member is a string that represents the + label for this payment app as it is usually displayed + to the user.- -
icon
member- - Need to define how an icon would be represented in this data. - Url? Data URL? Size options? Web - App Manifest may be used for inspiration. +
- +
icons
member- + The
+icons
member is an array of image objects that can serve as iconic representations of the payment app when presented to the user for selection.id
member- The
id
member is an identifier, unique @@ -938,24 +930,29 @@navigator.serviceWorker.register('/exampleapp.js') .then(function(registration) { return registration.paymentAppManager.setManifest({ - label: "ExampleApp", - icon: "...", + name: "ExampleApp", + icons: [ + { + "src": "icon/lowres.webp", + "sizes": "48x48", + "type": "image/webp" + },{ + "src": "icon/lowres", + "sizes": "48x48" + } ] options: [ { - label: "Visa ending ****4756", - icon: "...", + name: "Visa ending ****4756", id: "dc2de27a-ca5e-4fbd-883e-b6ded6c69d4f", enabledMethods: ["basic-card#visa"] }, { - label: "My Bob Pay Account: john@example.com", - icon: "...", + name: "My Bob Pay Account: john@example.com", id: "c8126178-3bba-4d09-8f00-0771bcfd3b11", enabledMethods: ["https://bobpay.com/"] }, { - label: "Add new credit/debit card to ExampleApp", - icon: "...", + name: "Add new credit/debit card to ExampleApp", id: "new-card", enabledMethods: [ "basic-card#visa", From 0176dfb5ee84c087109149d024989d83eefd1cf3 Mon Sep 17 00:00:00 2001 From: Ian Jacobs
Date: Thu, 1 Dec 2016 15:18:30 -0600 Subject: [PATCH 7/8] Updates to options based on 30 nov 2016 discussion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See minutes: https://www.w3.org/2016/11/30-apps-minutes#item05 * Support for selection of options is now required. * Changed language from “display” to “enable selection” --- index.html | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/index.html b/index.html index d506df9..4de6aca 100644 --- a/index.html +++ b/index.html @@ -425,7 +425,7 @@ User Experience
- The system should minimize user interaction for payment app registration, payment app selection, and payment credentials selection. Ideas include:
- When only one payment app matches, the user agent does not require user selection to launch it.
-- The user agent displays payment options for direct selection by the user. For example, instead of merely displaying information about a payment app that supports cards, the user agent could display some representation of individual registered cards. If the user can select an option directly, that could contribute to reducing the total number of required user actions. Within the payment apps task force, it has been suggested that this specification support payment apps providing payment option information to user agents, but that user agents would have discretion whether to display it.
+- The user agent displays payment options for direct selection by the user. For example, instead of merely displaying information about a payment app that supports cards, the user agent could display some representation of individual registered cards. If the user can select an option directly, that could contribute to reducing the total number of required user actions.
- It is likely that this specification will include guidance rather than requirements about specific user experience optimizations.
@@ -769,7 +769,7 @@For each payment method indicated in the PaymentAppOption's
enabledMethods
field, associate the payment option and the payment app - with the payment method for future use. + with the payment method.is to prepend the payment app name, e.g., "ExampleApp Visa ending in ***4756". However, when only one app is installed, the text "ExampleApp" is redundant. -
It may be simpler for implementers to remove payment options - from this spec. A medium level of complexity is to specify - payment options, but give user agents choice of whether payment - options are supported.
@@ -896,15 +892,15 @@
The id
member is an identifier, unique within the PaymentAppManifest, that will be passed to the - payment app to indicate which PaymentAppOption the user - selected. + payment app to indicate the PaymentAppOption selected + by the user.enabledMethods
memberThe @@ -1022,28 +1018,27 @@enabledMethods
member lists the payment method identifiers of the - payment methods enabled by this option. + payment methods enabled by this option. When the merchant has provided a filter, it may be necessary to provide additional information about conditions under which the payment method is enabled.Payment App Selection
Selectable App Information Display
After matching the user agent will have a list of payment apps that the user can select to handle the - payment request. How will these be ordered when they are displayed to the user, where do recommended apps + payment request. How will these are displayed and ordered, where do recommended apps fit in to the order and how do we treat apps that are both registered and recommended?
- What information is needed by the user agent to display selectable apps? This needs to be captured - during registration. + What information is needed by the user agent to display selectable apps? This needs to be captured during registration.
- The output of the payment method matching algorithm will be a list of matching payment apps from registered - payment apps and a list of recommended payment apps. The user agent will present this list of payment apps to the user - so they can select how they want to handle the payment request. + The output of the payment method matching algorithm will be a list of matching payment apps and options from registered + payment apps, and a list of recommended payment apps. The user agent will present this list of payment apps to the user for selection.
-For the display of matching payment apps:
+For matching payment apps:
-
-- The user agent MUST display any matching payment app. Note: See the definition of matching payment app, which excludes payment apps ignored due to user configuration or security issues.
+- The user agent MUST enable the user to select any matching payment app. Note: See the definition of matching payment app, which excludes payment apps ignored due to user configuration or security issues. Note also that the language here is about enabling selection rather than display — when the user agent displays only a subset of matching payment apps (e.g., the most recently used), the user must still be able to access other matching payment apps.
+- The user agent MUST enable the user to select any matching payment app options.
- The user agent MUST favor user-side order preferences (based on user configuration or behavior) over payee-side order preferences.
- The user agent MUST display matching payment apps in an order that corresponds to the order of supported payment methods provided by the payee, except where overridden by user-side order preferences.
- The user agent SHOULD allow the user to configure the display of matching payment apps to control the ordering and define preselected defaults.
For the display of recommended payment apps:
+For recommended payment apps:
- The user agent SHOULD display recommended payment apps and allow configuration to not display recommended payment apps.
- The user agent MUST distinguish recommended payment apps from registered payment apps.
@@ -1064,7 +1059,7 @@Selectable App Information Display
Examples of Ordering of Selectable Payment Apps
-The following are examples of user agent display behavior.
+The following are examples of user agent ordering of selectable payment apps.
- For a given Web site, display payment apps in an order that reflects usage patterns for the site (e.g., a frequently used payment app at the top, or the most recently used payment app at the top).
- Enable the user to set a preferred order for a given site or for all sites.
@@ -1147,8 +1142,8 @@Payment App Request Data
optionId
attribute- - This attribute indicates which PaymentAppOption the user - selected. It corresponds to the
From e8c5304132e10713197f2bc0028f8d1798722825 Mon Sep 17 00:00:00 2001 From: Ian Jacobsid
field provided during + This attribute indicates the PaymentAppOption selected by + the user. It corresponds to theid
field provided during payment app registration.Date: Mon, 12 Dec 2016 13:08:06 -0600 Subject: [PATCH 8/8] Added link to issue 73 https://github.com/w3c/webpayments-payment-apps-api/issues/73 --- index.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 4de6aca..474ab59 100644 --- a/index.html +++ b/index.html @@ -1415,9 +1415,8 @@ user interaction for the purposes of determining whether the service worker is allowed to open a window. -
- The actual rendering of a payment app window is a user agent - implementation detail. While opening an entirely new window is possible, +
See issue 73. What is required for interoperability here in how the service worker can open a window? How much of the actual rendering of a payment app window is a user agent + implementation detail? While opening an entirely new window is possible, it is more likely that the contents will be rendered in a way that makes it more obvious that the interactions pertain to the payment transaction. This is an area for potential user agent experimentation @@ -1425,7 +1424,7 @@
other types of windows can be distinguished based on the event type the user agent is using to grant permission to open a window. -
The remainder of this section is a non-normative explanation of how +
The remainder of this section is currently a non-normative explanation of how the service worker
WindowClient
class can be used to interact with users.