- From: Rouslan Solomakhin <notifications@github.com>
- Date: Tue, 11 Sep 2018 12:33:38 -0700
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 11 September 2018 19:34:00 UTC
Payment handler partners have told us that it's difficult to accurately detect whether the window is opened by a payment handler. So `window.paymentHandler` would be useful for this. Can we find a good use for promises here? For example: ```javascript if (window.paymentHandler) { // This browser has support for payment handlers. window.paymentHandler.then(request => { // This window was opened by a payment handler. request.respondWith(new Promise((accept, reject) => { // Do things. accept({method: "https://bobpay.xyz", data: {transactionId: "12345"}}); })); }); } ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/payment-handler/issues/300#issuecomment-420395983
Received on Tuesday, 11 September 2018 19:34:00 UTC