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 add optional "description" string field to PaymentShippingOption dictionary #902

Open
sahel-sh opened this issue Mar 13, 2020 · 5 comments · Fixed by #955
Open

Comments

@sahel-sh
Copy link

Payment apps supporting shipping delegation and/or use agents can use the merchant provided description field to show more details about each shipping option upon user interaction (e.g. when user hovers over the shipping option label)

@marcoscaceres
Copy link
Member

@sahel-sh, sounds interesting. Could you expand a bit on what you are proposing? If possible, please provide some examples from a couple of websites or services or native apps.

@sahel-sh
Copy link
Author

Thanks Marcos for reviewing this!

As an example Gpay is using this field to provide more details about each shipping option to their users, and they would like to have this field in payment request/handler APIs as well.

Since the shippingOptions in PaymentRequestEvent comes from payment details provided in PaymentRequest's constructor, changing the PaymentShippingOption dictionary in PaymentRequest spec would be enough.

dictionary PaymentShippingOption {
  required DOMString id;
  required DOMString label;
  required PaymentCurrencyAmount amount;
  DOMString description;
  boolean selected = false;
};

@marcoscaceres
Copy link
Member

I don't have any objections to adding this to the spec, but we'd probably want to get some more implementer buy-in (or payment handler buy-in). It's pretty trivial to add and pass along to a payment handler... so if it's of value, then I don't see any objection.

Folks following along a home - would love to hear some more expressions of support!

@marcoscaceres
Copy link
Member

Sent a PR for it #910 - @sahel-sh, would appreciate your feedback!

@ianbjacobs
Copy link
Collaborator

This issue was raised in Payment Request, but closed once we removed addresses from that API. We anticipate adding addresses back to the specification and so are re-opening this issue proactively.

@ianbjacobs ianbjacobs reopened this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment