Re: [browser-payment-api] Different card schemes have different mandatory field requirements (#9)

We should think carefully about why we make any field mandatory. I think you're overstating the value this provides in this context which is why I'm also in favor of using a dictionary here and not an interface.

Making fields mandatory or conform to some format is very useful when gathering direct user input but less so when simply defining a data structure that we are exchanging between the payment app and web app.

What happens if the payment app submits a response with no PAN? Who does the validation and throws an exception? The browser? That seems like a complex flow to handle as a developer.

Why not just leave it to the developer in the website code?

---
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/browser-payment-api/issues/9#issuecomment-200351033

Received on Wednesday, 23 March 2016 13:48:54 UTC