Web payments UI does not close if developer calls complete('something-something'). |
||||
Issue descriptionIf you pass into complete() method a string that is not defined by the spec (i.e. the string is not ‘unknown’, ‘success’ or ‘fail’), the promise returned by complete() will reject and the PaymentRequest UI will not close. The UI should close instead.
,
Apr 18 2017
Marijn, is there anything we can do here? PaymentResponse.complete('foo') is rejected because 'foo' is not one of the PaymentComplete enum members, but PaymentRequest.cpp is not notified of this. After 60 seconds, PaymentRequest.cpp times out waiting for complete() and finally closes the UI, but that's a very long developer-test cycle.
,
May 1 2017
I'm not sure how this is any different from a developer misspelling the method name itself, or similar errors? Calling "PaymentResponse.compelete('success')" will also fail, print something in dev-tools, but not close the UI until it times out. So it's not clear to me that there is something that needs to be done here?
Of course you could change the spec of the complete method to take an arbitrary string rather than an enum, and treat any string other than success and fail as unknown, but I'm not sure that is any better.
,
May 1 2017
> Of course you could change the spec of the complete method to take an arbitrary string rather than an enum, and treat any string other than success and fail as unknown, but I'm not sure that is any better. The spec used to have this behavior and then was switched to use an enum instead. Sounds like there's no easy fix for this. Given that the UI will be hidden after 60 seconds, I'd say this is not worth a deep investigation. Therefore, closing as WontFix. Please re-open if you feel otherwise.
,
Jun 27 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by zkoch@chromium.org
, Apr 17 2017