{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/issues/5","repository_url":"https://api.github.com/repos/w3c/webpayments-method-identifiers","labels_url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/issues/5/comments","events_url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/issues/5/events","html_url":"https://github.com/w3c/webpayments-method-identifiers/issues/5","id":159939632,"number":5,"title":"PROPOSAL: PMI identifies payment method specification, use meta-data for additional granularity","user":{"login":"adrianhopebailie","id":49902,"avatar_url":"https://avatars.githubusercontent.com/u/49902?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhopebailie","html_url":"https://github.com/adrianhopebailie","followers_url":"https://api.github.com/users/adrianhopebailie/followers","following_url":"https://api.github.com/users/adrianhopebailie/following{/other_user}","gists_url":"https://api.github.com/users/adrianhopebailie/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhopebailie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhopebailie/subscriptions","organizations_url":"https://api.github.com/users/adrianhopebailie/orgs","repos_url":"https://api.github.com/users/adrianhopebailie/repos","events_url":"https://api.github.com/users/adrianhopebailie/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhopebailie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/labels/Priority:%20High","name":"Priority: High","color":"f9d0c4"},{"url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/labels/proposal","name":"proposal","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/milestones/1","html_url":"https://github.com/w3c/webpayments-method-identifiers/milestones/23%20June","labels_url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/milestones/1/labels","id":1844255,"number":1,"title":"23 June","description":"","creator":{"login":"adrianhopebailie","id":49902,"avatar_url":"https://avatars.githubusercontent.com/u/49902?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhopebailie","html_url":"https://github.com/adrianhopebailie","followers_url":"https://api.github.com/users/adrianhopebailie/followers","following_url":"https://api.github.com/users/adrianhopebailie/following{/other_user}","gists_url":"https://api.github.com/users/adrianhopebailie/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhopebailie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhopebailie/subscriptions","organizations_url":"https://api.github.com/users/adrianhopebailie/orgs","repos_url":"https://api.github.com/users/adrianhopebailie/repos","events_url":"https://api.github.com/users/adrianhopebailie/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhopebailie/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-06-22T22:02:23Z","updated_at":"2016-06-22T22:02:34Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2016-06-13T12:33:42Z","updated_at":"2016-06-23T17:09:51Z","closed_at":null,"body":"Replaces #2 \r\n\r\n## Background\r\n\r\nThe current proposal of basic string matching has placed unnecessary restrictions on how PMIs can be used.\r\n\r\nUnder the current system both of the following PMI's reference the Card Payment Method Specification: \r\nhttps://webpayments.org/card/visa\r\nhttps://webpayments.org/card/mastercard\r\n\r\nThis is redundant because the PMI is fulfilling two roles:\r\n1. Identify the payment method that is supported ([Card Payment Method](https://w3c.github.io/webpayments-methods-card/)) as defined in a single Payment Method Specification.\r\n2. Pass additional semantics about how that payment method is supported (support for Visa and Mastercard branded cards)\r\n\r\nIt would be better if a payee or payment app could advertise their support for the card payment method by simply using the PMI; https://webpayments.org/card/ and then use some other mechanism to pass those additional semantics.\r\n\r\n## Caveat\r\n\r\nThe mechanism for passing additional semantics needs to be understood by the payment mediator (browser), at least in as much as the mediator must be able to execute the matching algorithm.\r\n\r\n__Example:__ If the supported card brands was passed in the payment method specific data then it would only be possible to evaluate if there is a match after invoking the payment app.\r\n\r\nHowever, it's not necessary that the mediator (browser) understand what the meta-data actually means, just how to use it for matching.\r\n\r\n__Example:__ The browser doesn't need to know what a card brand/scheme is, just how to perform matching on the set of values [\"visa\", \"mastercard\"] named \"brand\".\r\n## Proposal\r\n\r\nMatching should be done against two distinct pieces of data:\r\n 1. A payment method identifier (PMI) that identifies the payment method as defined in a payment method specification (Eg: Cards, SEPA direct debit, Alipay)\r\n 1. A set of filters/constraints that can be used to pass additional meta-data into the matching algorithm allowing the payee and payment app to provide additional granularity to the matching\r\n\r\nDefinition of the allowed meta-data would be done at a payment method level (i.e. in the payment method specification) but the matching algorithm would still support matching without needing to understand the semantic of the meta-data. (i.e. simple matching rules based on the names and values of the meta-data)\r\n\r\n## Implementation\r\n\r\nThere are numerous ways this could be implemented which can be decided upon later if this concept is adopted in principal\r\n\r\nSo the following PMIs might be implemented as follows:\r\n\r\n```javascript\r\n[\r\n  {\r\n    supportedMethods: [\r\n       \"https://web-payments/methods/card/visa\",\r\n       \"https://web-payments/methods/card/cup\",\r\n       \"https://web-payments/methods/card/mastercard\"\r\n   ]\r\n  },\r\n  {\r\n    supportedMethods: [\r\n      \"https://web-payments/methods/card/bitcoin/v1\",\r\n      \"https://web-payments/methods/card/bitcoin/v2\"\r\n    ],\r\n    data: {\r\n      bitcoinWallet: \"XXXX\",\r\n    }\r\n  }\r\n]\r\n```\r\n\r\n### 1 - PMIs allow query string parameters as matching meta-data\r\n\r\nMatch by first matching the URL portion without the query string and then find the intersection of query string parameters.\r\n\r\n```javascript\r\n[\r\n  {\r\n    supportedMethods: \"https://web-payments/methods/card/?brand=visa,mastercard,cup\"]\r\n  },\r\n  {\r\n    supportedMethods: [\"https://web-payments/methods/card/bitcoin/?ver=v1,v2\"],\r\n    data: {\r\n      bitcoinWallet: \"XXXX\",\r\n    }\r\n  }\r\n]\r\n```\r\n\r\n### 2 - Simple PMIs with additional meta-data in the JSON of the request\r\n\r\nMatch the PMI which is a simple URL and then look in a standard field in the request for additional \r\n\r\n```javascript\r\n[\r\n  {\r\n    supportedMethods: [\"https://web-payments/methods/card/\"],\r\n    methodMetadata: {\r\n      \"https://web-payments/methods/card/\" : {\r\n        \"brands\" : [\"visa\", \"mastercard\", \"cup\"]\r\n      }\r\n    }\r\n  },\r\n  {\r\n    supportedMethods: [\"https://web-payments/methods/card/bitcoin/\"],\r\n    methodMetadata: {\r\n      \"https://web-payments/methods/card/bitcoin/\" : {\r\n        \"versions\" : [\"v1\", \"v2\"]\r\n      }\r\n    },\r\n    data: {\r\n      bitcoinWallet: \"XXXX\",\r\n    }\r\n  }\r\n]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/issues/comments/228117197","html_url":"https://github.com/w3c/webpayments-method-identifiers/issues/5#issuecomment-228117197","issue_url":"https://api.github.com/repos/w3c/webpayments-method-identifiers/issues/5","id":228117197,"user":{"login":"adrianhopebailie","id":49902,"avatar_url":"https://avatars.githubusercontent.com/u/49902?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhopebailie","html_url":"https://github.com/adrianhopebailie","followers_url":"https://api.github.com/users/adrianhopebailie/followers","following_url":"https://api.github.com/users/adrianhopebailie/following{/other_user}","gists_url":"https://api.github.com/users/adrianhopebailie/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhopebailie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhopebailie/subscriptions","organizations_url":"https://api.github.com/users/adrianhopebailie/orgs","repos_url":"https://api.github.com/users/adrianhopebailie/repos","events_url":"https://api.github.com/users/adrianhopebailie/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhopebailie/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T17:09:51Z","updated_at":"2016-06-23T17:09:51Z","body":"> won't my app start to fail and I'll have to deal with people thinking it's my app's fault\r\n\r\nThat depends on the payment method. For a lot of the filters we think will be useful for cards it won't.\r\n\r\nIf I say I support all VISA cards and someone else says they only support VISA cards in the platinum tier I'd expect my app to seamlessly support a new tier like like red and the other app to not support it until they expressly state they do."}}
{"actor":{"display_login":"adrianhopebailie"}}