Re: [w3c/webpayments-payment-apps-api] Payment app identifier to manifest filename mapping (#48)

Right, but we can define some restrictions that make this easier to standardize I'd think.
So we could say:
 1. A ServiceWorker that tries to register itself as a payment app MUST use the default scope (`./` relative to the service worker `.js` file).
 2. The location of a payment app's ServiceWorker `.js` file can be derived by taking the URL `./payment-app.js` relative to the payment app identifier.

So the following would work together:
  * Payment App Identifier = `http://psp.example/app/v1`
  * Service Worker Scope = `http://psp.example/app/v1`
  * Payment App js file = `http://psp.example/app/v1/payment-app.js`

The implications of this are:
  1. Versioned payment apps must use different identifiers if both versions are supposed to co-exist.
  2. Browsers need to define a mechanism for native payments apps register themselves via the `paymentapp.js` file (could be that the file is a native payment app manifest instead of a ServiceWorker but could also be left to implementers)


-- 
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/48#issuecomment-261775283

Received on Sunday, 20 November 2016 12:28:20 UTC