Allow duplicate payment method identifiers in web payments |
||
Issue description
This code should be OK:
new PaymentRequest([{'supportedMethods': ['foo', 'foo']}], details);
new PaymentRequest([{'supportedMethods': ['foo']}, {'supportedMethods': ['foo']}], details);
new PaymentRequest([{'supportedMethods': ['foo']}], {'total': total, 'modifiers': [{'supportedMethods': ['foo', 'foo']}]});
new PaymentRequest([{'supportedMethods': ['foo']}], {'total': item, 'modifiers': [{'supportedMethods': ['foo']}, {'supportedMethods': ['foo']}]});
According to https://github.com/w3c/browser-payment-api/pull/261/files which removed the following text from the spec:
"If a <a>payment method identifier</a> appears more than once in the <code>methodData</code> or <code>details.modifiers</code> sequences, then <a>throw</a> a <a><code>TypeError</code></a>."
https://w3c.github.io/browser-payment-api/#paymentrequest-constructor
,
Oct 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e5c07135bb48e6e2c50117be7c9bc01e7ce10538 commit e5c07135bb48e6e2c50117be7c9bc01e7ce10538 Author: rouslan <rouslan@chromium.org> Date: Fri Oct 28 18:25:00 2016 Allow duplicate payment method identifiers. https://github.com/w3c/browser-payment-api/pull/261/files removed he following text from the spec: "If a <a>payment method identifier</a> appears more than once in the <code>methodData</code> or <code>details.modifiers</code> sequences, then <a>throw</a> a <a><code>TypeError</code></a>." This makes duplicate payment method identifiers OK to use. https://w3c.github.io/browser-payment-api/#paymentrequest-constructor BUG= 659332 Review-Url: https://codereview.chromium.org/2451873003 Cr-Commit-Position: refs/heads/master@{#428432} [modify] https://crrev.com/e5c07135bb48e6e2c50117be7c9bc01e7ce10538/components/payments/payment_request.mojom [modify] https://crrev.com/e5c07135bb48e6e2c50117be7c9bc01e7ce10538/third_party/WebKit/LayoutTests/payments/payment-request-interface.html [modify] https://crrev.com/e5c07135bb48e6e2c50117be7c9bc01e7ce10538/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
,
Jun 8 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by rouslan@chromium.org
, Oct 25 2016