New issue
Advanced search Search tips

Issue 660926 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----
Rollout-Type: ----

Blocked on:
issue 745745
issue 745749
issue 751226



Sign in to add a comment

Add data parameter to payment details modifier.

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

Issue description

Add the data parameter for payment details modifier that is
a JSON-serializeable object with optional information that might be
needed by the supported payment methods. For example, {"gateway":
"company"}.

Added in:
https://github.com/w3c/browser-payment-api/pull/261/files

Can be observed in:
https://w3c.github.io/browser-payment-api/#paymentdetailsmodifier-dictionary
 
Labels: -Type-Feature Type-Launch-OWP
Labels: Launch-M-Target-57-Stable
Screenshot_20161130-154114.png
190 KB View Download
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 2 2016

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

commit 736ccd21ff339cf3243ee5857d3de0a661dfec3c
Author: rouslan <rouslan@chromium.org>
Date: Fri Dec 02 00:00:07 2016

Add data parameter to payment details modifier.

This patch adds the data parameter for payment details modifier that is
a JSON-serializable object with optional information that might be
needed by the supported payment methods. For example, {"gateway":
"company"}. The data parameter is behind a runtime flag.

Added in:
https://github.com/w3c/browser-payment-api/pull/261/files

Spec:
https://w3c.github.io/browser-payment-api/#paymentdetailsmodifier-dictionary

Intent to implement:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/Dpc5Ftqgxlg/ZYenHNR0AgAJ

Example:
var supportedMethods = [{supportedMethods: ["basic-card"]}];
var shoppingCart = {total: {title: "Total",
                            currency: {code: "USD", value: "5.00"}}};
shoppingCart.modifiers = [{
    data: {supportedType: ["debit"]}, // THE NEW FEATURE
    supportedMethods: ["basic-card"],
    total: {title: "Total",
            currency: {code: "USD", value: "4.63"}}}];
new PaymentRequest(supportedMethods, shoppingCart);

To better share the object validation and stringification logic, this
patch merges the validation and conversion code for PaymentMethodData,
PaymentDetails, and PaymentDetailsModifier. This results in saving
around 50 lines of code.

BUG= 660926 

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

[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/components/payments/payment_details_validation.cc
[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/components/payments/payment_request.mojom
[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/third_party/WebKit/Source/modules/payments/PaymentDetailsModifier.idl
[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp
[modify] https://crrev.com/736ccd21ff339cf3243ee5857d3de0a661dfec3c/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 2 2016

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

commit eb085ef9baffdd6a595ab158556382075a7e2dc2
Author: rouslan <rouslan@chromium.org>
Date: Fri Dec 02 02:19:19 2016

Show modified total price for payment instruments.

If the merchant specifies custom pricing for a specific payment method,
show the custom total next to the payment method. For example, a custom
price for "visa" cards changes:

   Visa*1111, Jon Smith

to:

   Visa*1111, Jon Smith, $45.00

The feature is hidden behind chrome://flags#web-payments-modifiers until
it is complete.

BUG= 660926 

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

[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/app/generated_resources.grd
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/browser/about_flags.cc
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/browser/android/OWNERS
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/browser/android/chrome_feature_list.cc
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/chrome/browser/android/chrome_feature_list.h
[modify] https://crrev.com/eb085ef9baffdd6a595ab158556382075a7e2dc2/tools/metrics/histograms/histograms.xml

Video of updating order summary total.
total.mp4
17.5 MB Download
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 6 2016

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

commit a16a3356e94a792374ddbeea5cada71d531e6ad4
Author: rouslan <rouslan@chromium.org>
Date: Tue Dec 06 02:41:15 2016

Update order summary total when instruments change.

If the user selects a payment instrument that matches a modifier, then
the order summary total should be updated. For example, if the merchant
provides discounts for "visa", then selecting a "visa" type card should
update the total accordingly.

This feature is behind chrome://flags#web-payments-modifiers flag.

BUG= 660926 

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

[modify] https://crrev.com/a16a3356e94a792374ddbeea5cada71d531e6ad4/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 8 2016

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

commit a01e730142a80a46539e66684ed3dc8f8354fa5d
Author: rouslan <rouslan@chromium.org>
Date: Thu Dec 08 21:28:31 2016

Show additional display items when instruments change.

If the user selects a payment instrument that matches a modifier, then
the contents of the shopping cart should show the additional display
items from the modifier. For example, if the merchant provides
discounts for "visa", then selecting a "visa" type card should show the
"VISA discount $5.00" line item in the shopping cart.

This is accomplished by keeping track of the full modifier, instead of
just the total. This will also be useful in upcoming patch where the
modifier contents will be sent to the payment app.

This feature is behind chrome://flags#web-payments-modifiers flag.

This patch additionally removes the no longer used variable
"totalCurrency".

BUG= 660926 

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

[modify] https://crrev.com/a01e730142a80a46539e66684ed3dc8f8354fa5d/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
[modify] https://crrev.com/a01e730142a80a46539e66684ed3dc8f8354fa5d/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/ShoppingCart.java

Labels: -Launch-M-Target-57-Stable
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments
Blockedon: 745745
Blockedon: 745749
Blockedon: 751226
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 24 2017

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

commit 569ff9463daaf26917ae00327f19fa22196f2b0a
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Thu Aug 24 17:21:19 2017

[Payments] Enable web payments modifiers by default.

Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/PcG_926N4FA/tYS4cDEqBgAJ

Bug:  660926 
Change-Id: I8051d7c03b6149a55a035a32f3743aa935e6037a
Reviewed-on: https://chromium-review.googlesource.com/632597
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497102}
[modify] https://crrev.com/569ff9463daaf26917ae00327f19fa22196f2b0a/components/payments/core/features.cc
[modify] https://crrev.com/569ff9463daaf26917ae00327f19fa22196f2b0a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Project Member

Comment 17 by bugdroid1@chromium.org, Aug 24 2017

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

commit 569ff9463daaf26917ae00327f19fa22196f2b0a
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Thu Aug 24 17:21:19 2017

[Payments] Enable web payments modifiers by default.

Intent to ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/PcG_926N4FA/tYS4cDEqBgAJ

Bug:  660926 
Change-Id: I8051d7c03b6149a55a035a32f3743aa935e6037a
Reviewed-on: https://chromium-review.googlesource.com/632597
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497102}
[modify] https://crrev.com/569ff9463daaf26917ae00327f19fa22196f2b0a/components/payments/core/features.cc
[modify] https://crrev.com/569ff9463daaf26917ae00327f19fa22196f2b0a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Comment 18 by ma...@chromium.org, Aug 28 2017

Fixed?
Status: Fixed (was: Started)
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 7

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

commit af1cfb65aa121b157dfffd1575a36b7a1076e7c5
Author: Eric Willigers <ericwilligers@chromium.org>
Date: Tue Aug 07 22:48:41 2018

Retire PaymentDetailsModifierData flag

Web payments modifiers shipped in M62
https://chromium-review.googlesource.com/632597
https://www.chromestatus.com/feature/6636936064139264

BUG= 660926 

Change-Id: Id0ab64582180f3cba875618efe3b31177d9ce9b8
Reviewed-on: https://chromium-review.googlesource.com/1164973
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581380}
[modify] https://crrev.com/af1cfb65aa121b157dfffd1575a36b7a1076e7c5/third_party/blink/renderer/modules/payments/payment_details_modifier.idl
[modify] https://crrev.com/af1cfb65aa121b157dfffd1575a36b7a1076e7c5/third_party/blink/renderer/platform/runtime_enabled_features.json5

Sign in to add a comment