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

domenic commented on this pull request.

I've lost track of the plot on what feature this implements and how, but at least editorially it seems reasonable, with only a few nits.

I guess my biggest substantive question is why we're adding requestBillingAddress to PaymentOptions when it sounds like we're keeping billing address as a payment method-specific thing. (E.g., it is not returned in any property of PaymentResponse.) If that's the case, shouldn't whether or not to request the billing address be part of the payment method data?

> @@ -3881,9 +3904,16 @@ <h2>
             </li>
             <li>Set <var>event</var>.<a>[[\waitForUpdate]]</a> to true.
             </li>
+            <li>Let <var>identifer</var> be undefined.

Also, "identi**fer**" -> "identi**fier**"

> @@ -4364,9 +4394,10 @@ <h2>
         <p>
           The <dfn>update a <code>PaymentRequest</code>'s details
           algorithm</dfn> takes a <a>PaymentDetailsUpdate</a>
-          <var>detailsPromise</var> and a <a>PaymentRequest</a>
-          <var>request</var>. The steps are conditional on the
-          <var>detailsPromise</var> settling. If <var>detailsPromise</var>
+          <var>detailsPromise</var>, a <a>PaymentRequest</a>
+          <var>request</var>, and optionally a DOMString <var>identifer</var>
+          (a <a>payment method identifier</a>). The steps are conditional on

I don't think it should be optional. It should just either be a string or null. Spec-ese doesn't have the nice JavaScript thing where undefined = missing, so the below is actually broken when the third argument is not passed.

> @@ -4555,6 +4586,28 @@ <h2>
                   </li>
                 </ol>
               </li>
+              <li data-link-for="PaymentDetailsUpdate">If the
+              <a>paymentMethodErrors</a> member is present and
+              <var>identifier</var> is not undefined:
+                <ol>
+                  <li>If required by the specification that defines the
+                  <var>identifer</var>, then <a data-cite=
+                  "!WEBIDL#dfn-convert-ecmascript-to-idl-value">convert</a> <a>
+                    paymentMethodErrors</a> to an IDL value. Otherwise,
+                    <a data-cite=

It's already an object, so no need to convert.

-- 
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-146996601

Received on Thursday, 16 August 2018 19:54:27 UTC