Re: [w3c/webpayments] Payment Method Manifest spec - should enable country specific app discovery (#224)

@rsolomakhin,

I don't think I understand your comment yet. Here is what I am thinking (assuming, for a moment,
that the manifest file includes some bits for Alan's use cases):

1) The user clicks on the Buy button. If the browser doesn't yet know what the RelevantCountry is for the session, the browser determines the RelevantCountry (e.g., by IP address).
2) The browser parses the list of payment methods provided by the merchant. For those that are URLs, the browers fetches the manifest files (if not cached).
3) The browser parses the manifest file, which includes blocks of data labeled by country. Suppose the manifest file BNF looks something like this (apologies for my lousy BNF):

        countryBlock ::= [countryIdentifiers] dataBlock
        countryIdentifiers ::= countryIdentifer ["," countryIdentifier]*

The file works like this (again, making this up for discussion):
   * Any dataBlock that is not prefixed by a country label applies to any country.
   * Any dataBlock that is not prefixed by one or more country labels only applies
     when there's a match with the RelevantCountry.
   * First rule wins in case of overlap.

4) Using that algorithm, the browser determines the relevant rules and applies them. Applying them
means a few things:
   a) Only authorized payment apps should be included in canMakePayment() and show() computations.
   b) The browser fetches icons, etc. based on data in the payment method manifest file.

When you say "Chrome does not have a good way to determine its own country," I'm not
sure how that applies to the manifest file. Chrome would need to get information about
the RelevantCountry (a process to be determined) and compare to the payment method
owner's specs in the payment method manifest file. 

Ian

-- 
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/issues/224#issuecomment-290744154

Received on Friday, 31 March 2017 15:28:14 UTC