New issue
Advanced search Search tips

Issue 659332 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Allow duplicate payment method identifiers in web payments

Project Member Reported by rouslan@chromium.org, Oct 25 2016

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
 
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment