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

Remove special case handling for single shipping option. #210

Closed
wants to merge 2 commits into from

Conversation

adrianba
Copy link
Contributor

@adrianba adrianba commented Jun 8, 2016

We originally added special support for a single shipping option to allow a more streamlined user experience for the cases where you want to get a shipping address but you only have one shipping option. This means the user wouldn't have to select anything.

Since then, we added the selected field which allows you to indicate any shipping option should be the selected one. This means the special handling for a single option isn't really necessary any longer. If we remove this then it makes the mental model for developers easier. Developers are responsible for maintaining the selected state for shipping options. If they don't do this then an update to the shipping options causes the current option to be deselected and requires the user reselect.

One of the primary goals here is to ensure that a user never accepts a payment request with details they didn't expect. Another is that we should make it harder for web developer mistakes from misunderstanding the model to result in accepted payment requests with incorrect details. This proposal improves this by removing some of the magic from the API and making web developers be explicit.

@rsolomakhin
Copy link
Collaborator

+1. I this change makes shipping option handling more straightforward for the web developer.

@ianbjacobs
Copy link
Collaborator

+!

@adrianhopebailie
Copy link
Collaborator

LGTM

@adrianba
Copy link
Contributor Author

adrianba commented Jun 9, 2016

Merged as 73231dc.

@adrianba adrianba closed this Jun 9, 2016
@adrianba adrianba deleted the special-shipoption branch June 9, 2016 17:07
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