Closed maxlgu closed 4 years ago
CC @rsolomakhin
According to the ancient sacred texts (https://rsolomakhin.github.io/pr/ko/reject-update/):
When the merchant request shipping, but responds to shipping address change by rejecting the update promise, which should cancel payment request.
Let's do the same for payment method change event.
I guess that mean the PH UI should be closed as well?
@maxlgu
I guess that mean the PH UI should be closed as well?
Yes, cancelling the payment request should close the PH UI.
@rsolomakhin, so this is not covered in the spec?
Reading update a PaymentRequest's details algorithm ... I think we are ok here.
Upon rejection of detailsPromise: Abort the update with request and an "AbortError" DOMException.
Which:
"Abort the current user interaction and close down any remaining user interface."
Ok, cool.. closing. @maxlgu does the above make sense? Or did we miss something?
That answers my question. Thanks!
What's the expected behaviours should be if the paymentmethodchange event updates with a rejection? The following snippet demonstrates this scenario:
request.addEventListener('paymentmethodchange', (event) => { event.updateWith(Promise.reject('Error for test')); });