Skip to content

Commit

Permalink
Drop invalid PMIs in PR ctor (closes #557 #464)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Jul 24, 2017
1 parent daeb37d commit e3893b3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,24 @@ <h2>
</li>
<li>For each <var>paymentMethod</var> of <var>methodData</var>:
<ol>
<li>Let <var>isValidString</var> be the result of
<a data-cite=
"!payment-method-id#dfn-validate-a-standardized-payment-method-identifier">
validating</a> <var>paymentMethod</var>'s
<a>supportedMethods</a> member as a standardized method
identifer.
</li>
<li>If <var>isValidString</var> is false, <a data-cite=

This comment has been minimized.

Copy link
@adrianhopebailie

adrianhopebailie Jul 25, 2017

Collaborator

The input into the validation algorithm is a URL so this algorithm should have a step to parse the string as a URL first and re-throw any exceptions.

"!payment-method-id#dfn-validate-a-url-based-payment-method-identifier">
validate</a> <var>paymentMethod</var>'s
<a>supportedMethods</a> member as a URL-based payment
method identifer. If the result is again false, remove this
<var>paymentMethod</var> from <var>methodData</var> and
continue to the next <var>paymentMethod</var> (if any)
ignoring the sub-steps below and optionally informing the
developer that <var>paymentMethod</var>'s
<a>supportedMethods</a> member is invalid.

This comment has been minimized.

Copy link
@adrianhopebailie

adrianhopebailie Jul 25, 2017

Collaborator

Why not be consistent with the processing of the data in the next step and throw if the identifier is invalid?

</li>
<li>If the <a data-lt="PaymentMethodData.data">data</a>
member of <var>paymentMethod</var> is missing, let
<var>serializedData</var> be null. Otherwise, let
Expand Down

0 comments on commit e3893b3

Please sign in to comment.