Allow payment handlers to report back errors via Payment Request API#1050
Allow payment handlers to report back errors via Payment Request API#1050marcoscaceres merged 5 commits intogh-pagesfrom
Conversation
ccb85c9 to
aaa261e
Compare
stephenmcgruer
left a comment
There was a problem hiding this comment.
Ok I've incorporated your comments (thanks!) and put together three variants:
- A version where we take the unspecified error from the platform handler, and use the "let |error| be an appropriate {{DOMException}}" wording -e9eec11
- A version where the payment handler is presumed to pass us a DOMException directly (i.e., any conversion to DOMException happens 'inside' the relevant payment handler and any spec it has) - ae1280b
- A version which uses a general JavaScript value like AbortSignal does, and rejects with that reason - d976730
I personally prefer (2), but I'm open to any of them.
d976730 to
236c39b
Compare
|
Alternative, building on @stephenmcgruer proposal: PayPal's SDK exposes Proposed SolutionUse the existing WebIDL Two
|
|
(Removing Rouslan for review as he is no longer working on Payment Request :)) |
|
I don't think this is testable... but we should file browser bugs and I need to check if WebKit is currently bailing out anywhere with |
|
We should get an Ok from the folks in #1040 before merging, in case we've missed something... but otherwise, this seems ok to me. |
|
Filed bugs for Chromium and WebKit, filed an issue for Web-Based Payment Handler API, and added the following for WPT impact:
|
Looks like we have that ok - @ianbjacobs any concerns/thoughts from your side, or are we good to land this? |
ianbjacobs
left a comment
There was a problem hiding this comment.
I defer to the implementers here; and you seem happy so I'm happy.
See #1040
Co-authored by: @marcoscaceres
The following tasks have been completed:
Implementation commitment:
Optional, impact on Payment Handler spec?
w3c/web-based-payment-handler#428
Preview | Diff