[Web Payment] Improved error message for absence of instruments.
Before this patch, invoking PaymentRequest.show() for secure payment confirmation on a device without credentials would reject with "User closed PaymentRequest UI" error message instead of the more correct "Payment method not supported", if show() was called after PaymentRequest.canMakePayment() returned. This is detrimental to measuring the success of the secure payment confirmation dialog. This patch changes the secure payment confirmation UI controller to not invoke PaymentRequest::UserCancelled() when PaymentRequestState has finished looking for credentials and found none. This allows payment_request.cc to correctly the no-apps state by rejecting PaymentRequest.show() with the correct error message. After this patch, a device without credentials always rejects PaymentRequest.show() with "Payment method not supported" without implying that the user interacted with the UI dialog and cancelled it. Bug: 1123082 Change-Id: Idba82354f413c926c1f835ec34e50d3c29080bb5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383812 Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by:Nick Burris <nburris@chromium.org> Cr-Commit-Position: refs/heads/master@{#802955}
Showing
Please register or sign in to comment