Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editorial: better payment handler integration #700

Merged
merged 6 commits into from May 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 25 additions & 23 deletions index.html
Expand Up @@ -161,21 +161,28 @@ <h2>
<p>
The details of how to fulfill a payment request for a given <a>payment
method</a> is an implementation detail of a <dfn data-lt=
"payment handlers">payment handler</dfn>. Additionally, each payment
handler defines a <dfn>can make payment</dfn> algorithm. The details of
how a payment handler determines wether it, or the user, can
potentially "make a payment" is also an implementation detail of a
payment handler. For an example, see the <a data-cite=
"payment-method-basic-card#can-makepayment">can make payment</a>
algorithm of [[payment-method-basic-card]].
"payment handlers">payment handler</dfn>. Concretely, each payment
handler defines:
</p>
<dl>
<dt>
A <dfn>can make payment</dfn> algorithm
</dt>
<dd>
How a payment handler determines whether it, or the user, can
potentially "make a payment" is also an implementation detail of a
payment handler. For an example, see the <a data-cite=
"payment-method-basic-card#can-makepayment">can make payment</a>
algorithm of [[payment-method-basic-card]].
</dd>
</dl>
<p>
A payment handler also defines the <dfn>steps to respond to a payment
request</dfn>, which results with an object, or <a data-cite=
"!WEBIDL#idl-dictionary">dictionary</a>, that a a merchant uses to
process or validate the transaction. The structure of this object is
specific for each <a>payment method</a>. For an example of such an
object, see the <code><a data-cite=
request</dfn>, which return an object or <a data-cite=
"!WEBIDL#idl-dictionary">dictionary</a> that a merchant uses to process
or validate the transaction. The structure of this object is specific
to each <a>payment method</a>. For an example of such an object, see
the <code><a data-cite=
"payment-method-basic-card#dom-basiccardresponse">BasicCardResponse</a></code>
dictionary of [[payment-method-basic-card]].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change "The structure of this object is specific for each payment handler" to "The structure
of this object is specific for each payment method."

</p>
Expand Down Expand Up @@ -943,13 +950,10 @@ <h2>
algorithm.
</li>
<li>Let <var>registeredHandlers</var> be a <a>list</a> of
registered <a>payment handlers</a> that are authorized and can
handle payment request for <var>identifier</var>.
registered payment handlers for the payment method
<var>identifier</var>.
</li>
<li>If <var>registeredHandlers</var> is empty, then continue.
</li>
<li>Otherwise, for each <var>handler</var> in
<var>registeredHandlers</var>:
<li>For each <var>handler</var> in <var>registeredHandlers</var>:
<ol>
<li>Let <var>canMakePayment</var> be the result of running
<var>handler</var>'s <a>can make payment</a> algorithm with
Expand Down Expand Up @@ -1173,16 +1177,14 @@ <h2>
<a>payment handlers</a> that are authorized and can handle
payment request for <var>identifier</var>.
</li>
<li>If <var>handlers</var> is empty, then continue.
</li>
<li>Otherwise, for each <var>handler</var> in
<var>handlers</var>:
<li>For each <var>handler</var> in <var>handlers</var>:
<ol>
<li>Let <var>canMakePayment</var> be the result of running
<var>handler</var>'s <a>can make payment</a> algorithm with
<var>data</var>.
</li>
<li>If <var>canMakePayment</var> is true, return true.
<li>If <var>canMakePayment</var> is true, resolve
<var>promise</var> with true, and return.
</li>
</ol>
</li>
Expand Down