PaymentRequestUpdateEvent.updateWith() doesn't match with payment request spec. |
|||
Issue description
The updateWith() function doesn’t match with the payment request spec[1].
The spec says that only if some attribute of details is present, then the value corresponding to the attribute is updated.
However, the current implementation will update all values regardless of whether the attribute is present.
For example, the following code should update only total value on payment sheet UI.
e.updateWith({ total: { …. } });
But the current implementation will update all values such as shippingOptions.
So, the shippingOptions is set as empty sequence and then the UI will indicate that the merchant cannot ship to the current shipping address.
[1] https://w3c.github.io/browser-payment-api/#updatewith-method
,
Apr 7 2017
Yes, jinho is correct. We should fix.
,
Apr 7 2017
,
Apr 11 2017
Okay, I'll fix this issue. Thanks for the clarification.
,
Jul 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0973cc612310136695836f929f051c1ac8db5cb3 commit 0973cc612310136695836f929f051c1ac8db5cb3 Author: Jinho Bang <jinho.bang@samsung.com> Date: Mon Jul 17 21:37:11 2017 PaymentRequest: updateWith() should take PaymentDetailsUpdate promise. The PaymentDetails already splited into PaymentDetailsInit and PaymentDetailsUpdate. The updateWith() should take PaymentDetailsUpdate promise. This change is only for fixing typo and there is no change in behavior. Related spec link: https://w3c.github.io/browser-payment-api/#paymentrequestupdateevent-interface Bug: 704162 Change-Id: Ib1d4c290220fadf8fa95d4d11b5c5bda2b9300ce Reviewed-on: https://chromium-review.googlesource.com/572675 Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Jinho Bang <jinho.bang@samsung.com> Cr-Commit-Position: refs/heads/master@{#487253} [modify] https://crrev.com/0973cc612310136695836f929f051c1ac8db5cb3/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.idl
,
Aug 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/795e9d6ead0fab0ba44fa115ce93809863ca9524 commit 795e9d6ead0fab0ba44fa115ce93809863ca9524 Author: Jinho Bang <jinho.bang@samsung.com> Date: Thu Aug 10 02:21:43 2017 PaymentRequest: Throw if updateWith() is not trusted. Should throw InvalidStateError if the event is not trsuted in updateWith(). Related spec changes: https://github.com/w3c/browser-payment-api/pull/545 https://github.com/w3c/browser-payment-api/pull/546 Bug: 704162 Change-Id: I3b4391f927e9314671b715e62b49312a1127a04e Reviewed-on: https://chromium-review.googlesource.com/572604 Commit-Queue: Jinho Bang <jinho.bang@samsung.com> Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#493234} [modify] https://crrev.com/795e9d6ead0fab0ba44fa115ce93809863ca9524/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-update-event-updatewith-method.https-expected.txt [modify] https://crrev.com/795e9d6ead0fab0ba44fa115ce93809863ca9524/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp [modify] https://crrev.com/795e9d6ead0fab0ba44fa115ce93809863ca9524/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEventTest.cpp
,
Aug 28 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by rouslan@chromium.org
, Mar 22 2017Owner: zkoch@chromium.org
Status: Untriaged (was: Assigned)