From 77e3f547385667e0e1550ce13e71da9a8df9816c Mon Sep 17 00:00:00 2001
From: Domenic Denicola
every transaction: the merchant (e.g., an online web store), the buyer
represented by the user agent (e.g., the user buying from the
online web store), and the Payment Method (e.g., credit
+ "payment method|payment methods">payment method (e.g., credit
card). Information necessary to process and confirm a transaction is
- passed between the Payment Method and the merchant via the
+ passed between the payment method and the merchant via the
user agent with the buyer confirming and authorizing as
necessary across the flow.
+ The details of how to fulfill a payment request for a given payment + method are handled by payment apps. In this specification, + these details are left up to the user agent, but future + specifications may expand on the processing model in more detail. +
In addition to better, more consistent user experiences, this also enables web sites to take advantage of more secure payment schemes @@ -274,13 +281,15 @@
The PaymentRequest is constructed using the supplied
- methodData
list including any payment method
- specific data
, the payment details
, and the
- payment options
.
+ methodData list including any payment method
+ specific data, the payment
+ details, and the payment options. The
+ methodData supplied to the PaymentRequest
+ constructor SHOULD be in the order of preference of the caller.
- The methodData
sequence contains
+ The methodData sequence contains
PaymentMethodData dictionaries containing the payment
method identifiers for the payment methods that the web
site accepts and any associated payment method specific
@@ -303,7 +312,7 @@
- The details
object contains information about the
+ The details object contains information about the
transaction that the user is being asked to complete such as the
line items in an order.
- The options
object contains information about what
+ The options object contains information about what
options the web page wishes to use from the payment request system.
@@ -359,6 +368,8 @@+
- Set request.[[\methodData]] to - methodData. -
-- The methodData supplied to the PaymentRequest - constructor SHOULD be in the order of preference of the caller. - Implementations MAY show payment methods in this order if - possible but SHOULD prioritize the preference of the user when - presenting payment methods. -
+supportedMethods
sequences from each
- PaymentMethodData in the
- request.[[\methodData]] sequence.
- + Otherwise, show a user interface to allow the user to interact + with the payment request process, using those payment apps + and payment methods which the above step identified as + feasible. The user agent MAY show payment methods in the order + given by supportedMethods, but SHOULD prioritize the + preference of the user when presenting payment methods and + applications. +
++ The acceptPromise will later be resolved by the + user accepts the payment request algorithm through + interaction with the user interface. +
methodData
supplied to the constructor.
+ The methodData
supplied to the constructor, but
+ represented as tuples containing supported methods and a string
+ or null for data (instead of the original object form).
details
attribute value of
- response to a JSON-serializable object containing
- the payment method specific message that will be used by the
- merchant to process the transaction. The format of this response will
- be defined for each payment method.
+ response to an object containing the payment method
+ specific message that will be used by the merchant to process the
+ transaction. The format of this response will be defined for each
+ payment method, and the contents of the response will be
+ determined by the payment app used.
requestShipping
value of
request.[[\options]] is true, then copy the
@@ -2138,9 +2160,8 @@
The term JSON-serializable object used in this - specification means an object that can be serialized to a string - using JSON.stringify and later deserialized back to an - object using JSON.parse with no loss of data. + specification is not well defined; see issue + #307. +
++ The term JSON-serialize + applied to a given object means to run the algorithm specified by + the original value of the JSON.stringify function on the + supplied object, passing the supplied object as the sole argument, + and return the resulting string. This can throw an exception.