Re: [w3c/payment-request] Validate PMIs, ignore duplicates (#581)

domenic approved this pull request.

EDITORIALLY, lgtm with nits. It seems like people are still discussing the behavior from a normative perspective.

> @@ -519,8 +519,35 @@
               then <a>throw</a> a <a>TypeError</a>, optionally informing the
               developer that at least one <a>payment method</a> is required.
               </li>
+              <li>Let <var>seenPMIs</var> be an emtpy list.

Nit: "empty" misspelled

>                <li>For each <var>paymentMethod</var> of <var>methodData</var>:
                 <ol>
+                  <li data-tests=
+                  "payment-request-ctor-pmi-handling.https.html">Run the steps
+                  to <a data-cite=
+                  "payment-method-id#dfn-validate-a-payment-method-identifier">
+                    validate a payment method identifier</a> with
+                    <var>paymentMethod</var>.<a data-lt=
+                    "PaymentMethodData.supportedMethods">supportedMethods</a>.
+                    If it returns false, then throw a <a>RangeError</a>
+                    exception and terminate this algorithm. Optionally, inform
+                    the developer that the payment method identifier is
+                    invalid.
+                  </li>
+                  <li>If <a>seenPMIs</a> contains

`<a>` -> `<var>`

> @@ -2520,6 +2559,20 @@
                             exception, then <a>abort the update</a> with that
                             exception.
                             </li>
+                            <li>If <a>seenPMIs</a> contains

`<a>` -> `<var>`

-- 
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/581#pullrequestreview-56121846

Received on Monday, 14 August 2017 16:04:06 UTC