Re: [w3c/payment-method-basic-card] WIP: Last wins (#71)

marcoscaceres commented on this pull request.



> +          </pre>
+        </div>
+        <ol class="algorithm">
+          <li>For each <a data-cite="infra#pair">pair</a> (<a>DOMString</a>
+          <var>id</var> / string <var>data</var>) of
+          <var>request</var>.<a data-cite=
+          "payment-request/#dfn-serializedmethoddata">[[\serializedMethodData]]</a>
+          in reverse order:
+            <ol>
+              <li>If <var>id</var> is not "<a>basic-card</a>", continue.
+              </li>
+              <li>Let <var data-type="object">object</var> be result of
+              <a data-cite="ecma-262#sec-json.parse">JSON-parsing</a>
+              <var>data</var>.
+              </li>
+              <li>If <var>object</var> is <code>null</code>, continue.

> Can object also be null if the original PaymentMethodData didn't contain a data field?

Yes, the PR API substitutes missing with null. 

> Should the absence of data field also be considered "all networks are supported"?

I don’t feel strongly about it. From way back, we’d agreed that only “[]” would mean “all”. Thus I’m inclined to treat no data as “ignore”. 





-- 
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-method-basic-card/pull/71#discussion_r266955441

Received on Tuesday, 19 March 2019 15:40:00 UTC