Re: [w3c/browser-payment-api] Detecting Payment Method Availability (#316)

rsolomakhin commented on this pull request.



> +          <li>
+            Let <var>cacheInvalidateTimer</var> be the time <a>user agent</a> recorded for previous call to <a>canMakeActivePayment</a> for <var>topLevelDomain</var>. Set <a>DateTime</a> to <var>cacheInvalidateTimer</var> if it's not set. 
+          </li>
+          <li>
+            If <var>cacheInvalidateTimer</var> is set and is still active, resolve <var>acceptPromise</var> promise with <var>cached</var> response.
+          </li>
+          <li>
+            Let <var>supportedMethods</var> be the union of all the <a>supportedMethods</a> sequences from each
+            <a>PaymentMethodData</a> in the <var>request</var>@[[\methodData]] sequence.
+          </li>
+          <li>
+            Let <var>acceptedMethods</var> be <var>supportedMethods</var> with all identifiers removed that the
+            <a>user agent</a> does not accept and method supports active payment instrument for payment.
+          </li>
+          <li>
+            If the length of <var>acceptedMethods</var> is zero, then resolve <var>acceptPromise</var> with

@adrianba, the proposed function signature is `Promise<bool> canMakeActivePayment()`. This promise should return a `bool`.

-- 
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/browser-payment-api/pull/316

Received on Thursday, 17 November 2016 17:48:45 UTC