Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull filters out of payment method data #170

Closed
adrianhopebailie opened this issue Aug 4, 2016 · 2 comments
Closed

Pull filters out of payment method data #170

adrianhopebailie opened this issue Aug 4, 2016 · 2 comments

Comments

@adrianhopebailie
Copy link
Collaborator

As discussed on the call, I recommend that the payment method filters be defined outside of the opaque payment method data (data).

var supportedMethods = [{
    methods: ['urn:payment-method:basic-card-payment'],
    filters: {
        networks: ['visa', 'mastercard'],
        types: ['debit']
    },
    data: {
    ...
    }
}];
@msporny
Copy link
Member

msporny commented Aug 4, 2016

+1

I support exploring this change to the PMI spec and think that what @adrianhopebailie proposes above is a good starting point.

Things to consider:

  1. Do we want to support AND/OR clauses. I'd argue that we don't because it'll make the mechanism too complicated. I expect the logic to be "for each key in the 'filters' property, at least one item in the array associated with the key has to match the payment method being filtered for the payment method to be included in the filtered set".
  2. Wildcard matching and/or microsyntaxes in the filters. No, not in v1.

@adrianhopebailie
Copy link
Collaborator Author

As decided on the call on 18 August this is being closed until there are more use cases showing a need to generalize the filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants