Re: [w3c/webpayments-method-identifiers] Why URLs? (#9)

@tabatkins:
>Something that I'm still somewhat missing, tho (I thought I had it, but you're implying something different) is _what does this unique identifier do_? @ianbjacobs suggested that its purpose (as an origin) was to tell the browser what app/SW to boot up to handle some custom payment method. I can understand that, tho it could really do with some better explanation in this spec. In that case it's not really a "unique identifier" at all; that is, it couldn't be replaced by a GUID. It's a very specific and meaningful message that gives the browser directions on how to act.

It's a point of rendezvous between a payment requester and a payment app. The general lifecycle looks like this (although I'm eliding some details, like the difference between "installed" and "enabled" apps):

1. User visits a website that hosts a payment app (e.g., bankofphobos.com, bobpay.com, big-online-store.com)
2. The payment app [registers with the browser](https://w3c.github.io/webpayments-payment-apps-api/#paymentapp.register), saying "I can support the payment methods _x_, _y_, and _z_" (where _x_, _y_, and _z_ are the payment method identifiers we're currently discussing).
3. Steps 1 and 2 can be repeated an arbitrary number of times with different payment apps, each supporting different sets of payment methods.
4. At some later time, the user goes to a merchant site. It says something like "[I need $78, and can accept payment methods _a_, _b_, and _z_](https://w3c.github.io/browser-payment-api/#paymentrequest-interface)".
5. The browser looks at all the registered apps, finds the ones that can provide payment via any of the methods _a_ and/or _b_ and/or _z_, and displays them to the user. This includes the app we talk about above, since it supports _z_.
6. After the user selects a matching app, the browser passes the merchant's payment request along to the payment app so that it can be processed. The payment app's response is sent back to the payment requester.

So, payment method identifiers _are_ literally just unique identifiers that identify a means of payment (schema, behavior) between a payment requester and a payment app. Quite literally anything that is globally unique will work. GUIDs would be technically fine, although they are pretty developer-unfriendly.

-- 
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-method-identifiers/issues/9#issuecomment-240243632

Received on Tuesday, 16 August 2016 21:24:06 UTC