Re: [w3c/payment-request] Add ability to request payer's address (#749)

domenic requested changes on this pull request.

All nits

> @@ -1272,6 +1278,24 @@ <h2>
           "PaymentOptions.shippingType">shippingType</a> member).
         </p>
       </section>
+      <section>
+        <h2>
+          <dfn>payerAddress</dfn> attribute
+        </h2>
+        <p>
+          If the <a data-lt=
+          "PaymentOptions.requestPayerAddress">requestPayerAddress</a> member
+          was set to true in the <a>PaymentOptions</a> passed to the
+          <a>PaymentRequest</a> constructor, then <a>payerAddress</a> will be
+          the payer's address chosen by the user.

This paragraph seems like it could be more similar to the shipping address one. E.g., mentioning the payer address changed algorithm.

> @@ -1272,6 +1278,24 @@ <h2>
           "PaymentOptions.shippingType">shippingType</a> member).
         </p>
       </section>
+      <section>
+        <h2>
+          <dfn>payerAddress</dfn> attribute
+        </h2>
+        <p>
+          If the <a data-lt=
+          "PaymentOptions.requestPayerAddress">requestPayerAddress</a> member
+          was set to true in the <a>PaymentOptions</a> passed to the
+          <a>PaymentRequest</a> constructor, then <a>payerAddress</a> will be
+          the payer's address chosen by the user.
+        </p>
+        <p class="note">
+          On some user agents, the some attributes of the <a>payerAddress</a>'s

"the some" -> "some"

"the payerAddress's" -> "payerAddress"

> @@ -1272,6 +1278,24 @@ <h2>
           "PaymentOptions.shippingType">shippingType</a> member).
         </p>
       </section>
+      <section>
+        <h2>
+          <dfn>payerAddress</dfn> attribute
+        </h2>
+        <p>
+          If the <a data-lt=
+          "PaymentOptions.requestPayerAddress">requestPayerAddress</a> member
+          was set to true in the <a>PaymentOptions</a> passed to the
+          <a>PaymentRequest</a> constructor, then <a>payerAddress</a> will be
+          the payer's address chosen by the user.
+        </p>
+        <p class="note">
+          On some user agents, the some attributes of the <a>payerAddress</a>'s
+          might be redacted until the <a>user accepts the payment request</a> -

hyphen minus -> either em dash (—) or just use a comma

> @@ -1272,6 +1278,24 @@ <h2>
           "PaymentOptions.shippingType">shippingType</a> member).
         </p>
       </section>
+      <section>
+        <h2>
+          <dfn>payerAddress</dfn> attribute
+        </h2>
+        <p>
+          If the <a data-lt=
+          "PaymentOptions.requestPayerAddress">requestPayerAddress</a> member
+          was set to true in the <a>PaymentOptions</a> passed to the
+          <a>PaymentRequest</a> constructor, then <a>payerAddress</a> will be
+          the payer's address chosen by the user.
+        </p>
+        <p class="note">
+          On some user agents, the some attributes of the <a>payerAddress</a>'s
+          might be redacted until the <a>user accepts the payment request</a> -
+          at which point all the user provided details of <a>payerAddress</a>

"user provided" -> "user-provided"

> +          <a data-lt="PaymentResponse.payerAddress">payerAddress</a> attribute
+          value of <var>response</var> to null. Otherwise:
+            <ol>
+              <li>Let <var>redactList</var> be the empty <a>list</a>.
+              </li>
+              <li>Let <var>payerAddress</var> be the result of <a>create a
+              <code>PaymentAddress</code> from user-provided input</a> with
+              <var>redactList</var>.
+              </li>
+              <li>Set the <a data-lt=
+              "PaymentResponse.payerAddress">payerAddress</a> attribute value
+              of <var>response</var> to <var>payerAddress</var>.
+              </li>
+              <li>Set the <a data-lt=
+              "PaymentRequest.payerAddress">payerAddress</a> attribute value of
+              <var>request</var> to <var>payerAddress</var>.

It'll be worth testing that UAs create distinct objects here and change payerAddress to the new PaymentAddress object. That is, they can't mutate the existing object; per this spec they have to create a new one.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/749#pullrequestreview-135580397

Received on Monday, 9 July 2018 20:37:16 UTC