diff --git a/index.html b/index.html index 7b772ca..d92812c 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,7 @@ }; - +

This specification defines capabilities that enable Web applications to @@ -101,11 +101,13 @@

@@ -383,9 +393,9 @@

Can make payment

- If the payment handler supports CanMakePaymentEvent, the - user agent may use it to help with filtering of the available - payment handlers. + If the Web-based payment handler supports + CanMakePaymentEvent, the user agent may use it to help + with filtering of the available web-based payment handlers.

Implementations may impose a timeout for developers to respond to the @@ -419,7 +429,7 @@

The CanMakePaymentEvent is used to as a signal for whether the - payment handler is able to respond to a payment request. + web-based payment handler is able to respond to a payment request.

           [Exposed=ServiceWorker]
@@ -433,8 +443,8 @@ 

respondWith() method

- This method is used by the payment handler as a signal for whether - it can respond to a payment request. + This method is used by the web-based payment handler as a signal for + whether it can respond to a payment request.

@@ -485,9 +495,10 @@

Filtering of Payment Handlers

- Given a PaymentMethodData and a payment handler that matches on - payment method identifier, this algorithm returns - true if this payment handler can be used for payment: + Given a PaymentMethodData and a web-based payment handler that + matches on payment method identifier, this algorithm returns + true if this web-based payment handler can be used for + payment:

  1. Let methodName be the payment method identifier @@ -497,7 +508,8 @@

    PaymentMethodData.

  2. Let paymentHandlerOrigin be the origin of the - {{ServiceWorkerRegistration}} scope URL of the payment handler. + {{ServiceWorkerRegistration}} scope URL of the web-based payment + handler.
  3. Let paymentMethodManifest be the ingested and parsed payment method manifest for the @@ -511,13 +523,13 @@

  4. Otherwise, if the URL-based payment method identifier methodName has the same origin as paymentHandlerOrigin, fire the CanMakePaymentEvent - in the payment handler and return the result. + in the web-based payment handler and return the result.
  5. Otherwise, if supported origins in paymentMethodManifest is an ordered set of [=url/origin=] that contains the paymentHandlerOrigin, fire the - CanMakePaymentEvent in the payment handler and return the - result. + CanMakePaymentEvent in the web-based payment handler and return + the result.
  6. Otherwise, return `false`.
  7. @@ -529,8 +541,8 @@

    Invocation

    - Once the user has selected a payment handler, the user agent fires a - {{PaymentRequestEvent}} and uses the subsequent + Once the user has selected a web-based payment handler, the user agent + fires a {{PaymentRequestEvent}} and uses the subsequent PaymentHandlerResponse to create a PaymentResponse for [[!payment-request]].

    @@ -539,8 +551,8 @@

    "117"> Payment Request API supports delegation of responsibility to manage an abort to a payment app. There is a proposal to add a - paymentRequestAborted event to the Payment Handler interface. The event - will have a respondWith method that takes a boolean parameter + paymentRequestAborted event to the Web-based Payment Handler interface. + The event will have a respondWith method that takes a boolean parameter indicating if the paymentRequest has been successfully aborted.

    The PaymentRequestDetailsUpdate contains the updated total (optionally with modifiers and shipping options) and possible errors resulting from user selection of a payment method, a shipping - address, or a shipping option within a payment handler. + address, or a shipping option within a web-based payment handler.

             dictionary PaymentRequestDetailsUpdate {
    @@ -594,8 +606,9 @@ 

    error member

    - A human readable string that explains why the user selected payment - method, shipping address or shipping option cannot be used. + A human readable string that explains why the user selected + web-based payment method, shipping address or shipping option cannot + be used.

    @@ -782,8 +795,9 @@

    openWindow() method

    - This method is used by the payment handler to show a window to the - user. When called, it runs the open window algorithm. + This method is used by the web-based payment handler to show a + window to the user. When called, it runs the open window + algorithm.

    @@ -793,8 +807,8 @@

    method

    - This method is used by the payment handler to get updated total - given such payment method details as the billing address. When + This method is used by the web-based payment handler to get updated + total given such payment method details as the billing address. When called, it runs the change payment method algorithm.

    @@ -805,8 +819,8 @@

    method

    - This method is used by the payment handler to get updated payment - details given the shippingAddress. When called, it runs the + This method is used by the web-based payment handler to get updated + payment details given the shippingAddress. When called, it runs the change payment details algorithm.

    @@ -817,9 +831,9 @@

    method

    - This method is used by the payment handler to get updated payment - details given the shippingOption identifier. When called, it runs - the change payment details algorithm. + This method is used by the web-based payment handler to get updated + payment details given the shippingOption identifier. When called, + it runs the change payment details algorithm.

    @@ -828,7 +842,7 @@

    "respondWith(handlerResponsePromise)">respondWith() method

    - This method is used by the payment handler to provide a + This method is used by the web-based payment handler to provide a PaymentHandlerResponse when the payment successfully completes. When called, it runs the Respond to PaymentRequest Algorithm with |event| and handlerResponsePromise as @@ -876,7 +890,8 @@

    1. Let registeredMethods be the set of registered - payment method identifiers of the invoked payment handler. + payment method identifiers of the invoked web-based payment + handler.
    2. Create a new empty Sequence.
    3. @@ -924,7 +939,8 @@

      1. Let registeredMethods be the set of registered - payment method identifiers of the invoked payment handler. + payment method identifiers of the invoked web-based payment + handler.
      2. Create a new empty Sequence.
      3. @@ -993,8 +1009,8 @@

        The currently active WindowClient. This is set if a - payment handler is currently showing a window to the user. - Otherwise, it is null. + web-based payment handler is currently showing a window to the + user. Otherwise, it is null. @@ -1017,12 +1033,12 @@

        Upon receiving a PaymentRequest by way of PaymentRequest.show() and - subsequent user selection of a payment handler, the user agent - MUST run the following steps: + subsequent user selection of a web-based payment handler, the user + agent MUST run the following steps:

        1. Let registration be the {{ServiceWorkerRegistration}} - corresponding to the payment handler selected by the user. + corresponding to the web-based payment handler selected by the user.
        2. If registration is not found, reject the {{Promise}} that was created by
        3. Wait for all of the promises in the extend lifetime promises of dispatchedEvent to resolve.
        4. -
        5. If the payment handler has not provided a +
        6. If the Web-based payment handler has not provided a PaymentHandlerResponse, reject the {{Promise}} that was created by PaymentRequest.show() with an @@ -1118,29 +1134,29 @@

    - Windows + Windows

    - An invoked payment handler may or may not need to display information - about itself or request user input. Some examples of potential payment - handler display include: + An invoked web-based payment handler may or may not need to display + information about itself or request user input. Some examples of + potential web-based payment handler display include:

      -
    • The payment handler opens a window for the user to provide an - authorization code. +
    • The web-based payment handler opens a window for the user to provide + an authorization code.
    • -
    • The payment handler opens a window that makes it easy for the user - to confirm payment using default information for that site provided - through previous user configuration. +
    • The web-based payment handler opens a window that makes it easy for + the user to confirm payment using default information for that site + provided through previous user configuration.
    • -
    • When first selected to pay in a given session, the payment handler - opens a window. For subsequent payments in the same session, the - payment handler (through configuration) performs its duties without - opening a window or requiring user interaction. +
    • When first selected to pay in a given session, the web-based payment + handler opens a window. For subsequent payments in the same session, the + web-based payment handler (through configuration) performs its duties + without opening a window or requiring user interaction.

    - A payment handler that requires visual display and user + A Web-based payment handler that requires visual display and user interaction, may call openWindow() to display a page to the user.

    @@ -1148,8 +1164,8 @@

    {{PaymentRequestEvent}}, they SHOULD render the window in a way that is consistent with the flow and not confusing to the user. The resulting window client is bound to the tab/window that initiated the - PaymentRequest. A single payment handler SHOULD NOT be - allowed to open more than one client window using this method. + PaymentRequest. A single Web-based payment handler SHOULD + NOT be allowed to open more than one client window using this method.

    @@ -1182,8 +1198,8 @@

    {{Promise}} rejected with a {{TypeError}}.

  8. If url's origin is not the same as the service - worker's origin associated with the payment handler, return a - {{Promise}} resolved with null. + worker's origin associated with the web-based payment handler, + return a {{Promise}} resolved with null.
  9. Let promise be a new {{Promise}}.
  10. @@ -1210,8 +1226,8 @@

    with that exception and abort these steps.
  11. If the origin of newContext is not the same as the - service worker client origin associated with the payment - handler, then: + service worker client origin associated with the web-based + payment handler, then:
    1. Resolve promise with null.
    2. @@ -1271,7 +1287,7 @@

Using the simple scheme described above, a trivial HTML page that is - loaded into the payment handler window might look like the + loaded into the Web-based payment handler window might look like the following:

@@ -1350,8 +1366,8 @@ 

transaction and determine successful fund transfer.

- The user agent receives a successful response from the payment - handler through resolution of the Promise provided to the + The user agent receives a successful response from the web-based + payment handler through resolution of the Promise provided to the {{PaymentRequestEvent/respondWith}} function of the corresponding {{PaymentRequestEvent}} interface. The application is expected to resolve the Promise with a PaymentHandlerResponse instance @@ -1365,8 +1381,8 @@

but are not limited to:

@@ -1821,11 +1839,11 @@

User Awareness about Sharing Data Cross-Origin

@@ -1857,8 +1875,8 @@

apps through a payment method manifest. See the Handling a CanMakePaymentEvent algorithm for details. -
  • The user agent is not required to make available payment handlers - that pose security issues. Security issues might include: +
  • The user agent is not required to make available web-based payment + handlers that pose security issues. Security issues might include:
    • Certificates that are expired, revoked, self-signed, and so on. @@ -1872,10 +1890,10 @@

    - When a payment handler is unavailable for security reasons, the - user agent should provide rationale to the payment handler - developers (e.g., through console messages) and may also inform - the user to help avoid confusion. + When a web-based payment handler is unavailable for security + reasons, the user agent should provide rationale to the web-based + payment handler developers (e.g., through console messages) and + may also inform the user to help avoid confusion.

  • @@ -1888,9 +1906,10 @@

  • Payment method manifests authorize origins to distribute payment apps for a given payment method. When the user agent is - determining whether a payment handler matches the origin listed in - a payment method manifest, the user agent uses the scope URL - of the payment handler's service worker registration. + determining whether a web-based payment handler matches the origin + listed in a payment method manifest, the user agent uses the + scope URL of the web-based payment handler's service worker + registration.
  • @@ -1914,8 +1933,8 @@

    @@ -1935,10 +1954,11 @@

    Payment Handler Display Considerations

    - When ordering payment handlers, the user agent is expected to honor user - preferences over other preferences. User agents are expected to permit - manual configuration options, such as setting a preferred payment - handler display order for an origin, or for all origins. + When ordering web-based payment handlers, the user agent is expected to + honor user preferences over other preferences. User agents are expected + to permit manual configuration options, such as setting a preferred + web-based payment handler display order for an origin, or for all + origins.

    User experience details are left to implementers.