@@ -3239,10 +3239,10 @@ <h2>
3239
3239
</ li >
3240
3240
< li > Return < var > retryPromise</ var > .
3241
3241
< p class ="note ">
3242
- The < var > retryPromise</ var > will later be resolved or rejected by
3243
- either the < a > user accepts the payment request algorithm</ a > or
3244
- the < a > user aborts the payment request algorithm</ a > , which are
3245
- triggered through interaction with the user interface .
3242
+ The < var > retryPromise</ var > will later be resolved by the < a > user
3243
+ accepts the payment request algorithm</ a > , or rejected by either
3244
+ the < a > user aborts the payment request algorithm</ a > or < a > abort
3245
+ the update </ a > .
3246
3246
</ p >
3247
3247
</ li >
3248
3248
</ ol >
@@ -3546,7 +3546,8 @@ <h2>
3546
3546
</ td >
3547
3547
< td data-link-for ="PaymentResponse ">
3548
3548
Is true if the request for payment has completed (i.e.,
3549
- < a > complete()</ a > was called), or false otherwise.
3549
+ < a > complete()</ a > was called, or there was a fatal error that
3550
+ made the response not longer usable), or false otherwise.
3550
3551
</ td >
3551
3552
</ tr >
3552
3553
< tr >
@@ -4218,10 +4219,15 @@ <h2>
4218
4219
< li > Let < var > response</ var > be
4219
4220
< var > request</ var > .< a > [[\response]]</ a > .
4220
4221
</ li >
4221
- < li > If < var > response</ var > not null:
4222
+ < li > If < var > response</ var > is not null:
4222
4223
< ol >
4224
+ < li > Set < var > response</ var > .< a > [[\complete]]</ a > to true.
4225
+ </ li >
4226
+ < li > Assert: < var > response</ var > .< a > [[\retryPromise]]</ a > is not
4227
+ null.
4228
+ </ li >
4223
4229
< li > Reject < var > response</ var > .< a > [[\retryPromise]]</ a > with
4224
- < var > error</ var >
4230
+ < var > error</ var > .
4225
4231
</ li >
4226
4232
</ ol >
4227
4233
</ li >
@@ -4546,7 +4552,22 @@ <h2>
4546
4552
< li > Set < var > request</ var > .< a > [[\state]]</ a > to
4547
4553
"< a > closed</ a > ".
4548
4554
</ li >
4549
- < li > Reject the promise
4555
+ < li > Let < var > response</ var > be
4556
+ < var > request</ var > .< a > [[\response]]</ a > .
4557
+ </ li >
4558
+ < li > If < var > response</ var > is not null, then:
4559
+ < ol >
4560
+ < li > Set < var > response</ var > .< a > [[\complete]]</ a > to true.
4561
+ </ li >
4562
+ < li > Assert: < var > response</ var > .< a > [[\retryPromise]]</ a > is
4563
+ not null.
4564
+ </ li >
4565
+ < li > Reject < var > response</ var > .< a > [[\retryPromise]]</ a >
4566
+ with < var > exception</ var > .
4567
+ </ li >
4568
+ </ ol >
4569
+ </ li >
4570
+ < li > Otherwise, reject
4550
4571
< var > request</ var > .< a > [[\acceptPromise]]</ a > with
4551
4572
< var > exception</ var > .
4552
4573
</ li >
@@ -4560,17 +4581,25 @@ <h2>
4560
4581
</ section >
4561
4582
< div class ="note ">
4562
4583
< p >
4563
- < a data-lt ="abort the update "> Aborting the update</ a > is performed
4564
- when there is a fatal error updating the payment request, such as
4565
- the supplied < var > detailsPromise</ var > rejecting, or its
4566
- fulfillment value containing invalid data. This would potentially
4567
- leave the payment request in an inconsistent state since the
4568
- developer hasn't successfully handled the change event.
4584
+ < a > Abort the update</ a > runs when there is a fatal error updating
4585
+ the payment request, such as the supplied < var > detailsPromise</ var >
4586
+ rejecting, or its fulfillment value containing invalid data. This
4587
+ would potentially leave the payment request in an inconsistent
4588
+ state since the developer hasn't successfully handled the change
4589
+ event.
4590
+ </ p >
4591
+ < p >
4569
4592
Consequently, the < a > PaymentRequest</ a > moves to a "< a > closed</ a > "
4570
4593
state. The error is signaled to the developer through the rejection
4571
4594
of the < a > [[\acceptPromise]]</ a > , i.e., the promise returned by
4572
4595
< a data-lt ="PaymentRequest.show "> show()</ a > .
4573
4596
</ p >
4597
+ < p data-link-for ="PaymentResponse ">
4598
+ Similarly, < a > abort the update</ a > occurring during < a > retry()</ a >
4599
+ causes the < a > [[\retryPromise]]</ a > to reject, and the
4600
+ corresponding < a > PaymentRequest</ a > 's < a > [[\complete]]</ a > internal
4601
+ slot will be set to true (i.e., it can no longer be used).
4602
+ </ p >
4574
4603
</ div >
4575
4604
</ section >
4576
4605
</ section >
0 commit comments