Specification https://w3c.github.io/browser-payment-api/#paymentdetailsinit-dictionary Discussion https://github.com/w3c/browser-payment-api/issues/388 https://github.com/w3c/browser-payment-api/pull/426 Put request id in details dictionary
Hi Sanjoy, I would like to do this as part of actually sending id to native app: https://codereview.chromium.org/2770193003/ Is that ok with you?
Please take it up.
Thanks Sanjoy! Got my patch up here: https://codereview.chromium.org/2770193003/
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf commit c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf Author: rob.buis <rob.buis@samsung.com> Date: Fri Apr 28 02:53:35 2017 Implement request id in PaymentDetailsInit Implement request id in PaymentDetailsInit as well as id getter in PaymentRequest. In order for this functionality to make sense we pass the id to the payment app and make sure to set it in the PaymentResponse through the requestId attribute. Added PaymentRequestIdTest as a payment integration test for verifying the PaymentResponse contains the free-form identifier specified in PaymentDetailsInit. Added PaymentRequestTest.DetailsIdIsSet unit test to verify that PaymentDetailsInit.id is reflected in PaymentRequest.id. Added external/wpt/payment-request/payment-request-id.https.html to test that PaymentDetailsInit.id is reflected in PaymentRequest.id and that not providing an id generates a UUID. Added manual test external/wpt/payment-request/payment-request-response-id.html for verifying the PaymentResponse contains the free-form identifier specified in PaymentDetailsInit. Intent to Implement and Ship thread: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/WaHAg3wh7jw/vWAqxSnOCgAJ BUG= 701254 TEST=PaymentRequestIdTest, DetailsIdIsSet Review-Url: https://codereview.chromium.org/2770193003 Cr-Commit-Position: refs/heads/master@{#467854} [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/java/src/org/chromium/chrome/browser/payments/AndroidPaymentApp.java [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentInstrument.java [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/java_sources.gni [add] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIdTest.java [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java [add] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/test/data/payments/payment_request_id.js [add] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/chrome/test/data/payments/payment_request_id_test.html [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/components/payments/mojom/payment_request.mojom [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/LayoutTests/external/wpt/payment-request/interfaces.https-expected.txt [add] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-id.https.html [add] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-response-id.html [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentDetailsInit.idl [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentRequest.h [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentRequest.idl [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentResponse.h [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentResponse.idl [modify] https://crrev.com/c538713fa88d7fb0a831fbaa3b7dedafb9b5cdbf/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
Comment 1 by rob.b...@samsung.com
, Mar 24 2017