diff --git a/specs/paymentrequest.html b/specs/paymentrequest.html index ee4ad2f1..599ef1f9 100644 --- a/specs/paymentrequest.html +++ b/specs/paymentrequest.html @@ -688,6 +688,8 @@

PaymentDetails dictionary

PaymentOptions dictionary

 dictionary PaymentOptions {
+  boolean requestPayerEmail = false;
+  boolean requestPayerPhone = false;
   boolean requestShipping = false;
 };
       
@@ -700,14 +702,24 @@

PaymentOptions dictionary

The following fields MAY be passed to the PaymentRequest constructor:

+
requestPayerEmail
+
+ This boolean value indicates whether the user agent should collect and return + the payer's email address as part of the payment request. For example, this would be set to + true to allow a merchant to email a receipt. +
+
requestPayerPhone
+
+ This boolean value indicates whether the user agent should collect and return + the payer's phone number as part of the payment request. For example, this would be set to + true to allow a merchant to phone a customer with a billing enquiry. +
requestShipping
This boolean value indicates whether the user agent should collect and return a shipping address as part of the payment request. For example, this would be set to true when physical goods need to be shipped by the merchant to the user. This would be set to false for an online-only electronic purchase transaction. - If this value is not supplied then the PaymentRequest behaves as - if a value of false had been supplied.
@@ -760,6 +772,7 @@

ShippingAddress interface

readonly attribute DOMString languageCode; readonly attribute DOMString organization; readonly attribute DOMString recipient; + readonly attribute DOMString phone; };
@@ -788,6 +801,8 @@

ShippingAddress interface

This is the organization, firm, company, or institution at this address.
recipient
This is the name of the recipient or contact person.
+
phone
+
This is the phone number of the recipient or contact person.

If the requestShipping flag was set to true in the PaymentOptions @@ -842,6 +857,8 @@

PaymentResponse interface

readonly attribute DOMString methodName; readonly attribute object details; readonly attribute ShippingAddress? shippingAddress; + readonly attribute DOMString? payerEmail; + readonly attribute DOMString? payerPhone; Promise<void> complete(optional PaymentComplete result = ""); }; @@ -869,6 +886,18 @@

PaymentResponse interface

passed to the PaymentRequest constructor, then shippingAddress will be the full and final shipping address chosen by the user. +
payerEmail
+
+ 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. +
+
payerPhone
+
+ 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. +
@@ -1230,6 +1259,21 @@

User accepts the payment request algorithm

the transaction. The format of this response will be defined by a Payment Transaction Message Specification. +
  • + If the requestShipping value of request@[[\options]] + is true, then copy the shippingAddress attribute of + request to the shippingAddress attribute of response. +
  • +
  • + If the requestPayerEmail value of request@[[\options]] + is true, then set the payerEmail attribute of + response to the payer's email address selected by the user. +
  • +
  • + If the requestPayerPhone value of request@[[\options]] + is true, then set the payerPhone attribute of + response to the payer's phone number selected by the user. +
  • Set response@[[\completeCalled]] to false.