Title: [228342] trunk/Source/WebCore
Revision
228342
Author
aes...@apple.com
Date
2018-02-09 16:03:13 -0800 (Fri, 09 Feb 2018)

Log Message

[Payment Request] Apple Pay sheet does not dismiss when calling complete() with result "unknown" or "fail"
https://bugs.webkit.org/show_bug.cgi?id=182658
<rdar://problem/37293917>

Reviewed by Brady Eidson.

When PaymentResponse::complete() is called with a result of "unknown" or "fail", we should
treat this as a fatal error and dismiss the Apple Pay sheet. However, we were adding an
error with code "unknown" to the authorization result, which PassKit interprets as a
non-fatal error. Instead, we should not set any errors and just use a status code of
PaymentAuthorizationStatus::Failure, which PassKit interprets as a fatal error, dismissing
the sheet.

No test possible.

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::complete):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228341 => 228342)


--- trunk/Source/WebCore/ChangeLog	2018-02-09 23:56:41 UTC (rev 228341)
+++ trunk/Source/WebCore/ChangeLog	2018-02-10 00:03:13 UTC (rev 228342)
@@ -1,3 +1,23 @@
+2018-02-09  Andy Estes  <aes...@apple.com>
+
+        [Payment Request] Apple Pay sheet does not dismiss when calling complete() with result "unknown" or "fail"
+        https://bugs.webkit.org/show_bug.cgi?id=182658
+        <rdar://problem/37293917>
+
+        Reviewed by Brady Eidson.
+
+        When PaymentResponse::complete() is called with a result of "unknown" or "fail", we should
+        treat this as a fatal error and dismiss the Apple Pay sheet. However, we were adding an
+        error with code "unknown" to the authorization result, which PassKit interprets as a
+        non-fatal error. Instead, we should not set any errors and just use a status code of
+        PaymentAuthorizationStatus::Failure, which PassKit interprets as a fatal error, dismissing
+        the sheet.
+
+        No test possible.
+
+        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
+        (WebCore::ApplePayPaymentHandler::complete):
+
 2018-02-09  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Pasting from Excel no longer provides text/html data

Modified: trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp (228341 => 228342)


--- trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp	2018-02-09 23:56:41 UTC (rev 228341)
+++ trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp	2018-02-10 00:03:13 UTC (rev 228342)
@@ -409,7 +409,6 @@
     case PaymentComplete::Fail:
     case PaymentComplete::Unknown:
         authorizationResult.status = PaymentAuthorizationStatus::Failure;
-        authorizationResult.errors.append({ PaymentError::Code::Unknown, { }, std::nullopt });
         break;
     case PaymentComplete::Success:
         authorizationResult.status = PaymentAuthorizationStatus::Success;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to