diff --git a/index.html b/index.html index 106a8eb9..17c23ecd 100644 --- a/index.html +++ b/index.html @@ -346,11 +346,11 @@
+
The show() method is called when the page wants to begin user
interaction for the payment request. The show() method returns
a Promise that will be resolved when the user accepts the
@@ -680,23 +680,26 @@
- The abort() method may be called if the web page wishes to
- tell the user agent to abort the payment request
- and to tear down any user interface that might be presented.
- abort() can only be called after the show() method has
- been called and before this instance's [[\acceptPromise]] has
- been resolved. For example, a web page might choose to do this if the
- goods they are selling are only available for a limited amount of
- time. If the user does not accept the payment request within the
- allowed time period, then the request will be aborted.
-
- A user agent might not always be able to abort a request. For
- example, if the user agent has delegated responsibility for
- the request to another app. In this situation, abort() will
- reject the returned Promise.
-
+ The abort() method is called if the web page wishes to tell
+ the user agent to abort the payment request and
+ to tear down any user interface that might be shown. The
+ abort() can only be called after the show() method
+ has been called (see states) and before this
+ instance's [[\acceptPromise]] has been resolved. For
+ example, a web page might choose to do this if the goods they are
+ selling are only available for a limited amount of time. If the
+ user does not accept the payment request within the allowed time
+ period, then the request will be aborted.
+
+ A user agent might not always be able to abort a request.
+ For example, if the user agent has delegated responsibility
+ for the request to another app. In this situation, abort()
+ will reject the returned Promise.
+
The abort() method MUST act as follows:
+
The canMakePayment() method can be used by the developer to
determine if the PaymentRequest object can be used to make a
payment, before they call show(). It returns a Promise
@@ -802,13 +805,20 @@
- shippingAddress is populated when the user provides a shipping
- address. It is null by default. When a user provides a shipping
- address, the shipping address changed algorithm runs.
+ A PaymentRequest's shippingAddress attribute is
+ populated when the user provides a shipping address. It is null by
+ default. When a user provides a shipping address, the shipping
+ address changed algorithm runs.
- onshippingaddresschange is an
- shippingOption is populated when the user chooses a shipping
- option. It is null by default. When a user chooses a shipping option,
- the shipping option changed algorithm runs.
+ A PaymentRequest's shippingOption attribute is
+ populated when the user chooses a shipping option. It is null by
+ default. When a user chooses a shipping option, the shipping
+ option changed algorithm runs.
- onshippingoptionchange is an
+ Algorithms in this specification that accept a
+ PaymentDetailsInit dictionary will throw if the
+ total.amount.value is a negative number.
+
+ Algorithms in this specification that accept a
+ PaymentDetailsUpdate dictionary will throw if the
+ total.amount.value is a negative number.
+
Each attribute is converted to serialized
values as per [[!WEBIDL-LS]].
-
-
abort() method
-
canMakePayment() method
-
shippingAddress attribute
+ onshippingaddresschange attribute
+
EventHandler
- for an Event
named shippingaddresschange
.
+ A PaymentRequest's onshippingaddresschange attribute is
+ an EventHandler
for an Event
named
+ shippingaddresschange
.
shippingOption attribute
+ onshippingoptionchange attribute
+
EventHandler
for
- an Event
named shippingoptionchange
.
+ A PaymentRequest's onshippingoptionchange attribute is
+ an EventHandler
for an Event
named
+ shippingoptionchange
.
readonly attribute DOMString phone;
};
-
+
-
serializer
-
+ This is the [[!CLDR]] (Common Locale Data Repository) region code. + For example, US, GB, CN, or JP. +
+This is the most specific part of the address. It can include, for example, a street name, a house number, apartment number, a rural delivery route, descriptive instructions, or a post office box number. - -
This is the top level administrative subdivision of the country. For example, this can be a state, a province, an oblast, or a prefecture. - -
This is the city/town portion of the address. - -
This is the dependent locality or sublocality within a city. For example, used for neighborhoods, boroughs, districts, or UK dependent localities. - -
This is the postal code or ZIP code, also known as PIN code in India. - -
This is the sorting code as used in, for example, France. - -
This is the BCP-47 language code for the address. It's used to determine the field separators and the order of fields when formatting the address for display. - -
This is the organization, firm, company, or institution at this address. - -
This is the name of the recipient or contact person. This member may, under certain circumstances, contain multiline information. For example, it might contain "care of" information. - -
This is the phone number of the recipient or contact person. - - -
- If the requestShipping - flag was set to true in the PaymentOptions passed to the - PaymentRequest constructor, then the user agent will - populate the shippingAddress member of the - PaymentRequest and ultimately the PaymentResponse object - with the user's selected shipping address after the user has accepted - the payment. -
+ +Each attribute is converted to serialized values as per [[!WEBIDL-LS]]. - -
The payment method identifier for the payment method - that the user selected to fulfil the transaction. - -
An object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer. This data is returned by the payment method specific code that satisfies the payment request. - -
If the requestShipping flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then shippingAddress will be the full and final shipping address chosen by the user. - -
If the requestShipping flag was set to
true in the PaymentOptions passed to the PaymentRequest
constructor, then shippingOption will be the
- id
attribute of the selected shipping option.
-
-
If the requestPayerName flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then payerName will be the name provided by the user. - -
If the requestPayerEmail flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then payerEmail will be the email address chosen by the user. - -
If the requestPayerPhone flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then payerPhone will be the phone number chosen by the user. - -
The corresponding payment request id that spawned this payment response. - - +
++
The complete() method is called after the user has accepted the payment request and the [[\acceptPromise]] has been resolved. Calling the complete() method tells the user agent that the transaction is over (and SHOULD cause any remaining user interface to be closed).
-- After the payment request has been accepted and the - PaymentResponse returned to the page but before the page - calls complete() the payment request user interface remains - in a pending state. At this point the user interface ought not - offer a cancel command because acceptance of the payment request - has been returned. However, if something goes wrong and the page - never calls complete() then the user interface is blocked. -
-- For this reason, implementations may choose to impose a timeout for - the page to call complete(). If the timeout expires then the - implementation will behave as if complete() was called with - no arguments. -
-+ After the payment request has been accepted and the + PaymentResponse returned to the page but before the page calls + complete() the payment request user interface remains in a + pending state. At this point the user interface ought not offer a + cancel command because acceptance of the payment request has been + returned. However, if something goes wrong and the page never calls + complete() then the user interface is blocked. +
++ For this reason, implementations MAY impose a timeout for the page to + call complete(). If the timeout expires then the + implementation will behave as if complete() was called with no + arguments. +
The complete(result) method MUST act as follows:
@@ -1906,9 +1962,9 @@If the web page wishes to update the payment request then it should - call updateWith() and provide a promise that will resolve with - a PaymentDetailsUpdate dictionary containing changed values - that the user agent SHOULD present to the user. + call updateWith() and provide a PaymentDetailsUpdate + dictionary, or a promise for one, containing changed values that the + user agent SHOULD present to the user.
The PaymentRequestUpdateEvent constructor MUST set the @@ -1918,6 +1974,12 @@
+ If the web page wishes to update the payment request then it should + call updateWith() and provide a PaymentDetailsUpdate + dictionary, or a promise for one, containing changed values that + the user agent presents to the user. +
The updateWith(detailsPromise) method MUST act as follows: