|
3239 | 3239 | li>
|
3240 | 3240 | <li>Return <var>retryPromisevar>.
|
3241 | 3241 | <p class="note">
|
3242 |
| - The <var>retryPromisevar> will later be resolved or rejected by |
3243 |
| - either the <a>user accepts the payment request algorithma> or |
3244 |
| - the <a>user aborts the payment request algorithma>, which are |
3245 |
| - triggered through interaction with the user interface. |
| 3242 | + The <var>retryPromisevar> will later be resolved by the <a>user |
| 3243 | + accepts the payment request algorithma>, or rejected by either |
| 3244 | + the <a>user aborts the payment request algorithma> or <a>abort |
| 3245 | + the updatea>. |
3246 | 3246 | p>
|
3247 | 3247 | li>
|
3248 | 3248 | ol>
|
|
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 | 4219 | <li>Let <var>responsevar> be
|
4219 | 4220 | <var>requestvar>.<a>[[\response]]a>.
|
4220 | 4221 | li>
|
4221 |
| - <li>If <var>responsevar> not null: |
| 4222 | + <li>If <var>responsevar> is not null: |
4222 | 4223 | <ol>
|
| 4224 | + <li>Set <var>responsevar>.<a>[[\complete]]a> to true. |
| 4225 | + li> |
| 4226 | + <li>Assert: <var>responsevar>.<a>[[\retryPromise]]a> is not |
| 4227 | + null. |
| 4228 | + li> |
4223 | 4229 | <li>Reject <var>responsevar>.<a>[[\retryPromise]]a> with
|
4224 |
| - <var>errorvar> |
| 4230 | + <var>errorvar>. |
4225 | 4231 | li>
|
4226 | 4232 | ol>
|
4227 | 4233 | li>
|
|
4546 | 4552 | <li>Set <var>requestvar>.<a>[[\state]]a> to
|
4547 | 4553 | "<a>closeda>".
|
4548 | 4554 | li>
|
4549 |
| - <li>Reject the promise |
| 4555 | + <li>Let <var>responsevar> be |
| 4556 | + <var>requestvar>.<a>[[\response]]a>. |
| 4557 | + li> |
| 4558 | + <li>If <var>responsevar> is not null, then: |
| 4559 | + <ol> |
| 4560 | + <li>Set <var>responsevar>.<a>[[\complete]]a> to true. |
| 4561 | + li> |
| 4562 | + <li>Assert: <var>responsevar>.<a>[[\retryPromise]]a> is |
| 4563 | + not null. |
| 4564 | + li> |
| 4565 | + <li>Reject <var>responsevar>.<a>[[\retryPromise]]a> |
| 4566 | + with <var>exceptionvar>. |
| 4567 | + li> |
| 4568 | + ol> |
| 4569 | + li> |
| 4570 | + <li>Otherwise, reject |
4550 | 4571 | <var>requestvar>.<a>[[\acceptPromise]]a> with
|
4551 | 4572 | <var>exceptionvar>.
|
4552 | 4573 | li>
|
|
4560 | 4581 | section>
|
4561 | 4582 | <div class="note">
|
4562 | 4583 | <p>
|
4563 |
| - <a data-lt="abort the update">Aborting the updatea> is performed |
4564 |
| - when there is a fatal error updating the payment request, such as |
4565 |
| - the supplied <var>detailsPromisevar> 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 updatea> runs when there is a fatal error updating |
| 4585 | + the payment request, such as the supplied <var>detailsPromisevar> |
| 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>PaymentRequesta> moves to a "<a>closeda>"
|
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 updatea> occurring during <a>retry()a> |
| 4599 | + causes the <a>[[\retryPromise]]a> to reject, and the |
| 4600 | + corresponding <a>PaymentRequesta>'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