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

Add MerchantValidationEvent.prototype.methodName #776

Merged
merged 3 commits into from
Sep 13, 2018

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Sep 12, 2018

closes #775

The following tasks have been completed:

Implementation commitment:

Optional, Impact on Payment Handler spec?


Preview | Diff

@marcoscaceres
Copy link
Member Author

Tests web-platform-tests/wpt#12962

empty string, run the steps to <a data-cite=
"payment-method-id#dfn-validate-a-payment-method-identifier">validate
a payment method identifier</a> with
<var>eventInitDict</var>["<a>methodName</a>"]. If it returns false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm always unsure how much validation we should be doing in event constructors, i.e. should they be dumb property bags that hold whatever you pass in, or should they enforce domain logic constraints. But this is good for now, and consistent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, thought about the same. Consistency allows us to treat both implementers and user-land code as potentially invalid, which I think is a good thing.

@marcoscaceres
Copy link
Member Author

@aestes, @rsolomakhin, thanks also for the speedy review! Thanks @aestes for already adding the link to Safari!

@rsolomakhin, do you have a link too a Chrome bug?

@romandev
Copy link
Member

@marcoscaceres I filed a bug instead of Rouslan. https://crbug.com/883605

@marcoscaceres
Copy link
Member Author

Wrote some initial MDN docs for MerchantValidationEvent:
https://developer.mozilla.org/en-US/docs/Web/API/MerchantValidationEvent

@aestes, do have development docs folks on the Safari side that can fill out the rest? Otherwise, we can get folks over on the Mozilla/MDN side to do it. However, want to make sure what is there is right, as it's (right now) very Apple Pay specific.

@marcoscaceres
Copy link
Member Author

Ah, @romandev, you are the best. Thanks for filing it!

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

Successfully merging this pull request may close these issues.

Do we need to identify payment method in MerchantValidationEvent?
5 participants