Re: [w3c/webpayments-payment-apps-api] The relationship between payment apps and service workers (#33)

> If a payment app can be described purely in terms of HTTP requests, then service worker doesn't need to be an explicit dependency, but it becomes beneficial through existing mechanisms.

@jakearchibald that was the original proposal I made a few months back which is probably why @tommythorsen is bringing it up. My argument in favor of an HTTP request is that it is less platform specific and so could be handled by non-browsers as easily as a `ServiceWorker` using `onfetch`.

We discussed this at our face to face in June and the consensus was to use ServiceWorkers.

The thinking went something like this:
* There are two cases
  1. Sending the payment request to a remote service
  2. Processing it locally
* If the browser forwards payment requests as an HTTP POST then it's easy to intercept in a ServiceWorker and process locally, likewise if it's sent to a ServiceWorker then it's easy to create a new request and send it to a remote service so both WORK the question is which feels easier to use.
* I think the consensus was that for Web developers writing Javascript code and not needing to catch a raw request and inspect it to decide if it's a payment request felt more natural.

Lots of previous discussion:
* https://github.com/w3c/webpayments/issues/130
* https://github.com/w3c/webpayments/issues/156

The current ED still uses HTTP:
* https://w3c.github.io/webpayments-payment-apps-api/

-- 
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/webpayments-payment-apps-api/issues/33#issuecomment-243091185

Received on Monday, 29 August 2016 10:41:25 UTC