This is redundant because the PMI is fulfilling two roles:
Identify the payment method that is supported (Card Payment Method)
Pass additional semantics about how that payment method is supported (support for Visa and Mastercard branded cards)
It 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.
Caveat
The mechanism for passing additional semantics needs to be understood by the payment mediator (browser). 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.
Proposal
Match PMIs by first matching the URL portion without the query string and then find the intersection of query string parameters treating a missing parameter as a wildcard (match-all).
i.e. The output of the matching algorithm for two URIs will be a new URI that is the intersection of the two inputs
The following table shows illustrative examples:
NOTE: Using / instead of a URL to save space, this would normally be a URL
Background
The current proposal of basic string matching has placed unnecessary restrictions on how PMIs can be used.
Under the current system both of the following PMI's reference the Card Payment Method Specification: https://webpayments.org/card/visa https://webpayments.org/card/mastercard
This is redundant because the PMI is fulfilling two roles:
It 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.
Caveat
The mechanism for passing additional semantics needs to be understood by the payment mediator (browser). 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.
Proposal
Match PMIs by first matching the URL portion without the query string and then find the intersection of query string parameters treating a missing parameter as a wildcard (match-all).
i.e. The output of the matching algorithm for two URIs will be a new URI that is the intersection of the two inputs
The following table shows illustrative examples: NOTE: Using / instead of a URL to save space, this would normally be a URL