New issue
Advanced search Search tips

Issue 711677 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Duplicate Shipping IDs in Payment Request - Print Console Error

Project Member Reported by mattgaunt@chromium.org, Apr 14 2017

Issue description

What steps will reproduce the problem?
(1) Go to: https://gauntface.github.io/payment-request-doc-demos/src/
(2) Click on: Shipping Options with Non-Unique IDs

What is the expected result?
As a developer I should see an error that the user facing error was caused by duplicate ID's in the shipping options

What happens instead?
The implementation follows the spec, treating duplicate ID's as invalid address (by setting the shippingoptions to an empty sequence). But the developer has no reason why.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Components: Blink>Payments
Status: Assigned (was: Untriaged)
Status: Started (was: Assigned)
Matt, is this message OK?

  "Duplicate shipping identifiers are treated as an invalid address
   indicator."
Sounds good to me :) Thanks Rouslan.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fed3fc6630e9ea6248153708b7f9a301b98624c4

commit fed3fc6630e9ea6248153708b7f9a301b98624c4
Author: rouslan <rouslan@chromium.org>
Date: Wed Apr 19 21:18:21 2017

Log duplicate shipping option ID warning in web payments API.

Before this patch, passing duplicate shipping option identifiers into
web payments API was silently treated as an indicator of invalid
shipping address. This matches the spec, but the web developer may be
confused.

The fix is to add a warning message in console:
  "Duplicate shipping option identifier '<id>' is treated as an invalid
  address indicator."

Spec:
https://w3c.github.io/browser-payment-api/#constructor
(See step 8, "Process shipping options.")

BUG= 711677 

Review-Url: https://codereview.chromium.org/2830683002
Cr-Commit-Position: refs/heads/master@{#465751}

[modify] https://crrev.com/fed3fc6630e9ea6248153708b7f9a301b98624c4/third_party/WebKit/LayoutTests/payments/payment-request-interface-expected.txt
[modify] https://crrev.com/fed3fc6630e9ea6248153708b7f9a301b98624c4/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Status: Fixed (was: Started)

Sign in to add a comment