Apple Pay button does nothing on nytimes.com
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2017 22:03:59 +0000 (22:03 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2017 22:03:59 +0000 (22:03 +0000)
commit78a30ccdc2907a995d189b7ec8a0484b4ec02235
tree98c7b3a683351ada0cd70ead3ecf54128d58c35f
parent205961aea05c1d45cdc80160e5652c7fd4d8f1ec
Apple Pay button does nothing on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=167664
rdar://problem/30273885

Reviewed by Sam Weinig.

Source/WebCore:

Separate line item validation into convertAndValidateTotal and convertAndValidate. The former
works on totals (which require an amount), and the latter works on regular line items that do not require an amount
if the item type is "pending".

* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidateTotal):
(WebCore::convertAndValidate):
Only check the amount if the type is not pending.

(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
Call convertAndValidateTotal for totals.

LayoutTests:

Add a new test.

* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/ssl/applepay/ApplePaySession-expected.txt
LayoutTests/http/tests/ssl/applepay/ApplePaySession.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/applepay/ApplePaySession.cpp