⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 215612 in webkit


Ignore:
Timestamp:
Apr 21, 2017, 9:40:57 AM (9 years ago)
Author:
andersca@apple.com
Message:

Remove another use of toPaymentAuthorizationStatus
https://bugs.webkit.org/show_bug.cgi?id=171114

Reviewed by Dan Bernstein.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::completeShippingContactSelection):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r215608 r215612  
     12017-04-21  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove another use of toPaymentAuthorizationStatus
     4        https://bugs.webkit.org/show_bug.cgi?id=171114
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * Modules/applepay/ApplePaySession.cpp:
     9        (WebCore::ApplePaySession::completeShippingContactSelection):
     10
    1112017-04-21  Alex Christensen  <achristensen@webkit.org>
    212
  • trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp

    r215588 r215612  
    829829    ApplePayShippingContactUpdate update;
    830830
    831     auto authorizationStatus = toPaymentAuthorizationStatus(status);
    832     if (!authorizationStatus)
    833         return Exception { INVALID_ACCESS_ERR };
    834 
    835831    std::optional<ApplePayError::Code> errorCode;
    836832    std::optional<ApplePayError::ContactField> contactField;
    837833
    838     switch (*authorizationStatus) {
    839     case PaymentAuthorizationStatus::Success:
     834    switch (status) {
     835    case ApplePaySession::STATUS_SUCCESS:
    840836        break;
    841837
    842     case PaymentAuthorizationStatus::Failure:
    843     case PaymentAuthorizationStatus::PINRequired:
    844     case PaymentAuthorizationStatus::PINIncorrect:
    845     case PaymentAuthorizationStatus::PINLockout:
     838    case ApplePaySession::STATUS_FAILURE:
     839    case ApplePaySession::STATUS_PIN_REQUIRED:
     840    case ApplePaySession::STATUS_PIN_INCORRECT:
     841    case ApplePaySession::STATUS_PIN_LOCKOUT:
    846842        errorCode = ApplePayError::Code::Unknown;
    847843        break;
    848844
    849     case PaymentAuthorizationStatus::InvalidBillingPostalAddress:
     845    case ApplePaySession::STATUS_INVALID_BILLING_POSTAL_ADDRESS:
    850846        errorCode = ApplePayError::Code::BillingContactInvalid;
    851847        break;
    852848
    853     case PaymentAuthorizationStatus::InvalidShippingPostalAddress:
     849    case ApplePaySession::STATUS_INVALID_SHIPPING_POSTAL_ADDRESS:
    854850        errorCode = ApplePayError::Code::ShippingContactInvalid;
    855851        contactField = ApplePayError::ContactField::PostalAddress;
    856852        break;
    857853
    858     case PaymentAuthorizationStatus::InvalidShippingContact:
     854    case ApplePaySession::STATUS_INVALID_SHIPPING_CONTACT:
    859855        errorCode = ApplePayError::Code::ShippingContactInvalid;
    860856        break;
     857
     858    default:
     859        return Exception { INVALID_ACCESS_ERR };
    861860    }
    862861
Note: See TracChangeset for help on using the changeset viewer.