Skip to content

Feat: adds PaymentItemType enum and PaymentItem.type #666

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

Merged
merged 6 commits into from
Feb 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@

issue
617).
  • PaymentItem's type member and the
    PaymentItemType enum (see
    "https://github.com/w3c/payment-request/issues/163">issue 163).
    Expand Down Expand Up @@ -281,6 +286,7 @@

    {
    label: "Sales Tax",
    amount: { currency: "USD", value: "5.00" },
    type: "tax"
    },
    ],
    total: {
    Expand Down Expand Up @@ -1848,6 +1854,8 @@

    required DOMString label;
    required PaymentCurrencyAmount amount;
    boolean pending = false;
    // Note: type member is "at risk" of being removed!
    PaymentItemType type;
    };

    Expand Down Expand Up @@ -1881,7 +1889,63 @@

    the user interface for the payment request.

    This feature has been marked "at risk". Firefox plans to
    experiment with this feature during the Candidate Recommendation
    phase. If you'd like for this feature to remain in the specification,
    please signal your support for it to remain in
    "https://github.com/w3c/payment-request/issues/163">issue 163.

    type member
    A PaymentItemType enum value, which a developer can use to
    explicitly indicate that this member is of a particular type. A
    user agent MAY use the value of type to assist in the
    presentation of PaymentItem by, for example, visually
    grouping types together or other otherwise distinguishing them from
    other types (or from items that have no associated type).

    This feature has been marked "at risk". Firefox plans to
    experiment with this feature during the Candidate Recommendation phase.
    If you'd like for this feature to remain in the specification, please
    signal your support for it to remain in
    "https://github.com/w3c/payment-request/issues/163">issue 163.

    PaymentItemType enum
    enum PaymentItemType {
    "tax"
    };

    The PaymentItemType serves to categorize a PaymentItem
    into particular types.

    "tax"
    Indicates that the corresponding PaymentItem represents a form
    of taxation. Examples include sales tax, goods and services tax,
    value added tax, an so on.

    PaymentAddress interface
    Expand Down