Re: [w3c/payment-request] remove matching .data text from .show() (#578)

adrianhopebailie commented on this pull request.



> @@ -839,33 +841,33 @@
               <var>acceptPromise</var> with that error and terminate this
               algorithm.
               </li>
-              <li>Determine which <a>payment handlers</a> support
-              <var>identifier</var>. For each resulting payment handler, if
-              payment method specific capabilities supplied by the payment
-              handler match those provided by <var>data</var>, the payment
-              handler matches.
+              <li>Add each <a>payment handler</a> that supports

This is much clearer wording, nice!

BUT, it does ignore the case where the browser is able to fail fast because the handler allows it to. 

The argument that the payment sheet is still shown is correct BUT that is a side-effect of how the `basic-card` payment handler is implemented in those browsers.
i.e. It claims that it supports all networks and card types so it always matches. 

Those implementations have decided that "support" does not mean "has a card loaded" but rather "is able to load a card if needed". If we want to be specific about what "support" means then I agree that should be defined in the payment method spec for that payment method. But, we still need a hook here to tell implementors that this is where they do that check.

A future payment method or a different implementation of a `basic-card` handler may have a much more definitive response when determining if the handler supports the request based on what's in the data.

(And I agree that the output of this should be consistent between `show()` and `canMakePayment()`).

Could this read:

```html
<li>For each <a>payment handler</a> that supports <var>identifier</var>:
    <ol>
        <li>If <var>data</var> indicates the <a>payment handler</a> 
        will not be able to handle the payment, continue.</li>
        <li>Else, add <a>payment handler</a> into <var>handlers</var>.</li>
    </ol>
</li>
```

-- 
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/578#pullrequestreview-54859234

Received on Tuesday, 8 August 2017 07:54:26 UTC