-
Notifications
You must be signed in to change notification settings - Fork 135
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
Various fixes to the PaymentRequest constructor #374
Conversation
cf6b338
to
0b6440d
Compare
@domenic, this one also now needs rebase. So. Close. |
Just hit refresh :) |
ah 👍 |
0b6440d
to
6eea34d
Compare
Is there a need to reorder the checks to align with Blink? I think this might make our implementation out of compliance with the spec. Need to check on the impact of this but would probably prefer we don't change ordering if we don't need to. |
In general some ordering fixes would be good. E.g. the current spec splits up checking methodData into two locations of the algorithm, interspersing checks and processing of other arguments between them, which is just strange (and requires looping over the sequence twice). If there's a different ordering to the top-level "sections" desired, that'd be fine too. But the grouping here makes more sense than the current spec. In other words, this PR's ordering is:
Any reordering of these seems reasonable, although I think the allowed to use check should be first. But the current spec, which splits up several of these steps into two or three separate substeps which are then sprinkled around the algorithm, seems bad. |
- Fixes w3c#373: align ordering of steps with Blink's implementation, except check for allowed-to-use first since that makes more sense - Fixes w3c#334: properly get the total.amount.value instead of pretending total is a string - Fixes w3c#333 and fixes w3c#335: do not assume various dictionaries are present - Fixes part of w3c#321: use proper dictionary terminology - Ensures request.[[details]].shippingOptions/modifiers is always a sequence, instead of sometimes left as not present - Fixes various algorithm structure and typographic issues
6eea34d
to
e07946b
Compare
@marcoscaceres done |
@adrianba, want your ok to merge this (and that Edge is willing to make the necessary changes to implementation, if any). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can live with this.
PaymentItem
can't be a "valid decimal monetary value" #334: properly get the total.amount.value instead of pretending total is a stringThis is on top of #368 and #370 and can only be merged after them.