Re: [w3c/payment-request] Allow payment handlers to report back errors via Payment Request API (PR #1050)

@marcoscaceres commented on this pull request.



> +        </p>
+        <ol class="algorithm">
+          <li>Let |request:PaymentRequest| be the {{PaymentRequest}} object
+          that the user is interacting with.
+          </li>
+          <li>If |request|.{{PaymentRequest/[[state]]}} is not
+          "[=PaymentRequest/interactive=]", then terminate this algorithm and
+          take no further action.
+          </li>
+          <li>Set |request|.{{PaymentRequest/[[state]]}} to
+          "[=PaymentRequest/closed=]".
+          </li>
+          <li>Set |request|'s <a>payment-relevant browsing context</a>'s
+          <a>payment request is showing</a> boolean to false.
+          </li>
+          <li>Let |error| be an {{"OperationError"}} {{DOMException}}.

Nit: Inline this where the rejection happens below (x2)



-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/1050#pullrequestreview-3725326629
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/payment-request/pull/1050/review/3725326629@github.com>

Received on Thursday, 29 January 2026 22:19:46 UTC