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

Proposal to abort if updateWith promise is rejected #209

Closed
wants to merge 5 commits into from

Conversation

adrianba
Copy link
Contributor

@adrianba adrianba commented Jun 8, 2016

This is a proposal for how to handle #187. It causes the payment request to be aborted if the promise passed to updateWith() is then rejected.

If the promise passed to updateWith() is rejected then you end up in an inconsistent state. Either the page hasn't correctly processed the change event (which might mean it didn't correctly update the price, for example) or, if you revert the user's change, the user may end up in a state that they didn't expect. Neither option is good. Instead, after discussion with @zkoch, we're proposing that this aborts the payment request.

This is a proposal for how to handle w3c#187. It causes the payment request
to be aborted if the promise passed to updateWith() is then rejected.
@rsolomakhin
Copy link
Collaborator

Looks OK to me.

@adrianhopebailie
Copy link
Collaborator

LGTM

@adamroach - does this address #187 as you expected? If so I suggest this is merged and #187 closed.

@adamroach
Copy link
Contributor

I'm not tickled with this as a resolution, but it does at least put defined behavior around the promise rejection, which was the high-order problem from my perspective. We can close the issue.

This is a proposal for issue w3c#4: Should it be possible to vary amounts depending on payment method.

The goal of this change is to make it simple for web developers in the majority case
when price does not vary by payment method. If a developer wishes to have a different
price for specific payment methods then they include a PaymentDetailsModifier that
includes the new total amount and optionally additional display items that are appended
to the main payment details display items for display. This allows the developer to
explain why the price is different due to a discount or surcharge, for example.
@adrianba
Copy link
Contributor Author

adrianba commented Jun 9, 2016

Merged as b6af22d.

@adrianba adrianba closed this Jun 9, 2016
@adrianba adrianba deleted the update-rejected branch June 9, 2016 19:01
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.

None yet

4 participants