Issue metadata
Sign in to add a comment
|
Add data parameter to payment details modifier. |
||||||||||||||||||||||||||||||||||||||||||
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
,
Nov 23 2016
,
Nov 23 2016
Intent to implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/Dpc5Ftqgxlg/ZYenHNR0AgAJ
,
Nov 30 2016
,
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
,
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
,
Dec 5 2016
Video of updating order summary total.
,
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
,
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
,
Jun 8 2017
,
Jun 27 2017
,
Jul 18 2017
,
Jul 18 2017
,
Aug 1 2017
,
Aug 15 2017
,
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
,
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
,
Aug 28 2017
Fixed?
,
Aug 28 2017
,
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 |
|||||||||||||||||||||||||||||||||||||||||||
Comment 1 by rouslan@chromium.org
, Nov 23 2016