Changeset 228342 in webkit


Ignore:
Timestamp:
Feb 9, 2018 4:03:13 PM (6 years ago)
Author:
aestes@apple.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228340 r228342  
     12018-02-09  Andy Estes  <aestes@apple.com>
     2
     3        [Payment Request] Apple Pay sheet does not dismiss when calling complete() with result "unknown" or "fail"
     4        https://bugs.webkit.org/show_bug.cgi?id=182658
     5        <rdar://problem/37293917>
     6
     7        Reviewed by Brady Eidson.
     8
     9        When PaymentResponse::complete() is called with a result of "unknown" or "fail", we should
     10        treat this as a fatal error and dismiss the Apple Pay sheet. However, we were adding an
     11        error with code "unknown" to the authorization result, which PassKit interprets as a
     12        non-fatal error. Instead, we should not set any errors and just use a status code of
     13        PaymentAuthorizationStatus::Failure, which PassKit interprets as a fatal error, dismissing
     14        the sheet.
     15
     16        No test possible.
     17
     18        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
     19        (WebCore::ApplePayPaymentHandler::complete):
     20
    1212018-02-09  Wenson Hsieh  <wenson_hsieh@apple.com>
    222
  • trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp

    r228195 r228342  
    410410    case PaymentComplete::Unknown:
    411411        authorizationResult.status = PaymentAuthorizationStatus::Failure;
    412         authorizationResult.errors.append({ PaymentError::Code::Unknown, { }, std::nullopt });
    413412        break;
    414413    case PaymentComplete::Success:
Note: See TracChangeset for help on using the changeset viewer.