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

Support fine-grained errors for payment methods #752

Merged
merged 4 commits into from
Aug 10, 2018

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Jul 6, 2018

closes #727

The following tasks have been completed:

  • Confirmed there are no ReSpec errors/warnings.
  • Added Web platform tests (link)
  • added MDN Docs (link)
  • added MDN compat data

Implementation commitment:

  • Safari - already implemented.
  • Chrome
  • Firefox
  • Edge (public signal)

Impact on Payment Handler spec?
See: w3c/payment-handler#306

So we can do, for example:
screenshot 2018-06-26 14 14 33


Preview | Diff

@marcoscaceres
Copy link
Member Author

On Basic Card side: w3c/payment-method-basic-card#58

Copy link
Collaborator

@domenic domenic left a comment

Choose a reason for hiding this comment

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

LGTM with nits editorially. Unsure on consensus status.

index.html Outdated
@@ -3213,6 +3213,28 @@ <h2>
<li>Set <var>response</var>.<a>[[\retryPromise]]</a> to
<var>retryPromise</var>.
</li>
<li data-link-for="PaymentValidationErrors">If
<var>errorFields</var>'s <a>paymentMethod</a> member was passed, and
Copy link
Collaborator

Choose a reason for hiding this comment

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

"was passed" -> "is present"

index.html Outdated
<a>payment method</a>, then <a data-cite=
"!WEBIDL#dfn-convert-ecmascript-to-idl-value">convert</a>
<var>errorFields</var> <a>paymentMethod</a> to an IDL value.
Otherwise, <a data-cite=
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unsure whether this buys anything, versus just ignoring it. Maybe it's useful for web-based payment handlers??

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's what I was thinking... not all payment handlers will be formally specified, so this allows stuff to be passed to "https://bob.pay".

index.html Outdated
if required by the specification that defines <var>response</var>'s
<a>payment method</a>, then <a data-cite=
"!WEBIDL#dfn-convert-ecmascript-to-idl-value">convert</a>
<var>errorFields</var> <a>paymentMethod</a> to an IDL value.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe "to an IDL value of the type specified there" or similar?

index.html Outdated
<dfn>paymentMethod</dfn> member
</dt>
<dd>
A payment method specific error. See, for example,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Singular -> plural?

@marcoscaceres marcoscaceres force-pushed the method_errors branch 2 times, most recently from b30c368 to 842812c Compare July 9, 2018 21:08
@marcoscaceres
Copy link
Member Author

Thanks for checking on status. We have an implementer's call wrt this and other features coming up on the 18th.

@marcoscaceres
Copy link
Member Author

Added link to Gecko tracking bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1473081).

@rsolomakhin
Copy link
Collaborator

lgtm

@marcoscaceres
Copy link
Member Author

YAY!!! WELCOME BACKK!!!!

@rsolomakhin
Copy link
Collaborator

THANKS!

@stpeter
Copy link

stpeter commented Jul 18, 2018

Hey @rsolomakhin see email from Ian just now, too. ;-)

@rsolomakhin
Copy link
Collaborator

Just missed the email and the meeting, sorry! I will join the next one.

@marcoscaceres
Copy link
Member Author

@rsolomakhin, when you get to it, could you drop in a tracking bug for Blink? Same for any other bugs.

@rsolomakhin
Copy link
Collaborator

@marcoscaceres, done. What's the meaning of the checkbox?

@marcoscaceres
Copy link
Member Author

What's the meaning of the checkbox?

Not much. It’s satisfying to click tho.

@marcoscaceres
Copy link
Member Author

As this depends on payment method, I'll test this as part of Basic Card: w3c/payment-method-basic-card#58

@marcoscaceres marcoscaceres merged commit 1816526 into gh-pages Aug 10, 2018
@marcoscaceres marcoscaceres deleted the method_errors branch August 10, 2018 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signaling payment handler details errors
4 participants