diff --git a/Hardware/Hardware/CardReader/CardReaderConnectionOptions.swift b/Hardware/Hardware/CardReader/CardReaderConnectionOptions.swift index 7b98a199e68..d7c0bebf6ce 100644 --- a/Hardware/Hardware/CardReader/CardReaderConnectionOptions.swift +++ b/Hardware/Hardware/CardReader/CardReaderConnectionOptions.swift @@ -1,14 +1,14 @@ import Foundation public struct CardReaderConnectionOptions { - public let builtInOptions: BuiltInCardReaderConnectionOptions? + public let tapToPayOptions: TapToPayCardReaderConnectionOptions? - public init(builtInOptions: BuiltInCardReaderConnectionOptions?) { - self.builtInOptions = builtInOptions + public init(tapToPayOptions: TapToPayCardReaderConnectionOptions?) { + self.tapToPayOptions = tapToPayOptions } } -public struct BuiltInCardReaderConnectionOptions { +public struct TapToPayCardReaderConnectionOptions { public let termsOfServiceAcceptancePermitted: Bool public init(termsOfServiceAcceptancePermitted: Bool) { diff --git a/Hardware/Hardware/CardReader/CardReaderDiscoveryMethod.swift b/Hardware/Hardware/CardReader/CardReaderDiscoveryMethod.swift index 5e8d38b6d36..52069ed70e3 100644 --- a/Hardware/Hardware/CardReader/CardReaderDiscoveryMethod.swift +++ b/Hardware/Hardware/CardReader/CardReaderDiscoveryMethod.swift @@ -1,6 +1,6 @@ import Foundation public enum CardReaderDiscoveryMethod { - case localMobile + case tapToPay case bluetoothScan } diff --git a/Hardware/Hardware/CardReader/CardReaderService.swift b/Hardware/Hardware/CardReader/CardReaderService.swift index 21833e90bbb..245beb8ec12 100644 --- a/Hardware/Hardware/CardReader/CardReaderService.swift +++ b/Hardware/Hardware/CardReader/CardReaderService.swift @@ -17,7 +17,7 @@ public protocol CardReaderService { var softwareUpdateEvents: AnyPublisher { get } /// The Publisher that emits when TTP Terms and Services are accepted - var builtInCardReaderAcceptToSEvents: AnyPublisher { get } + var tapToPayCardReaderAcceptToSEvents: AnyPublisher { get } // MARK: - Commands diff --git a/Hardware/Hardware/CardReader/CardReaderType.swift b/Hardware/Hardware/CardReader/CardReaderType.swift index 25da0b376da..cc2db913f39 100644 --- a/Hardware/Hardware/CardReader/CardReaderType.swift +++ b/Hardware/Hardware/CardReader/CardReaderType.swift @@ -8,7 +8,7 @@ public enum CardReaderType: String, CaseIterable { /// BBPOS WisePad 3 case wisepad3 /// Tap on Mobile: Apple built in reader - case appleBuiltIn + case tapToPay /// Other case other } @@ -28,7 +28,7 @@ extension CardReaderType { return "STRIPE_M2" case .wisepad3: return "WISEPAD_3" - case .appleBuiltIn: + case .tapToPay: return "COTS_DEVICE" default: return "UNKNOWN" diff --git a/Hardware/Hardware/CardReader/StripeCardReader/CardReader+CardReaderDiscoveryType.swift b/Hardware/Hardware/CardReader/StripeCardReader/CardReader+CardReaderDiscoveryType.swift index 0338bd9691b..a3a4e65cb0d 100644 --- a/Hardware/Hardware/CardReader/StripeCardReader/CardReader+CardReaderDiscoveryType.swift +++ b/Hardware/Hardware/CardReader/StripeCardReader/CardReader+CardReaderDiscoveryType.swift @@ -3,8 +3,8 @@ import Foundation public extension CardReader { var discoveryMethod: CardReaderDiscoveryMethod? { switch readerType { - case .appleBuiltIn: - return .localMobile + case .tapToPay: + return .tapToPay case .chipper, .stripeM2, .wisepad3: return .bluetoothScan case .other: diff --git a/Hardware/Hardware/CardReader/StripeCardReader/CardReaderDiscoveryMethod+Stripe.swift b/Hardware/Hardware/CardReader/StripeCardReader/CardReaderDiscoveryMethod+Stripe.swift index e7f356fdb6c..a646ab61b58 100644 --- a/Hardware/Hardware/CardReader/StripeCardReader/CardReaderDiscoveryMethod+Stripe.swift +++ b/Hardware/Hardware/CardReader/StripeCardReader/CardReaderDiscoveryMethod+Stripe.swift @@ -4,7 +4,7 @@ import StripeTerminal public extension CardReaderDiscoveryMethod { func toStripe() -> DiscoveryMethod { switch self { - case .localMobile: + case .tapToPay: return .tapToPay case .bluetoothScan: return .bluetoothScan diff --git a/Hardware/Hardware/CardReader/StripeCardReader/CardReaderType+Stripe.swift b/Hardware/Hardware/CardReader/StripeCardReader/CardReaderType+Stripe.swift index c6913fa0032..0ff4ca6eb34 100644 --- a/Hardware/Hardware/CardReader/StripeCardReader/CardReaderType+Stripe.swift +++ b/Hardware/Hardware/CardReader/StripeCardReader/CardReaderType+Stripe.swift @@ -14,7 +14,7 @@ extension CardReaderType { case .wisePad3: return .wisepad3 case .tapToPay: - return appleBuiltIn + return tapToPay default: return .other } @@ -28,7 +28,7 @@ extension CardReaderType { return .stripeM2 case .wisepad3: return .wisePad3 - case .appleBuiltIn: + case .tapToPay: return .tapToPay case .other: return nil diff --git a/Hardware/Hardware/CardReader/StripeCardReader/NoOpCardReaderService.swift b/Hardware/Hardware/CardReader/StripeCardReader/NoOpCardReaderService.swift index 5e01db0863f..b26e401cdb0 100644 --- a/Hardware/Hardware/CardReader/StripeCardReader/NoOpCardReaderService.swift +++ b/Hardware/Hardware/CardReader/StripeCardReader/NoOpCardReaderService.swift @@ -16,7 +16,7 @@ public struct NoOpCardReaderService: CardReaderService { = CurrentValueSubject(.none).eraseToAnyPublisher() /// The Publisher that emits the when when TTP Terms and Services are accepted - public var builtInCardReaderAcceptToSEvents: AnyPublisher + public var tapToPayCardReaderAcceptToSEvents: AnyPublisher = PassthroughSubject().eraseToAnyPublisher() public init() {} diff --git a/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift b/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift index df9aca9f64a..b869453cb91 100644 --- a/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift +++ b/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift @@ -16,7 +16,7 @@ public final class StripeCardReaderService: NSObject { private let discoveryStatusSubject = CurrentValueSubject(.idle) private let readerEventsSubject = PassthroughSubject() private let softwareUpdateSubject = CurrentValueSubject(.none) - private let builtInCardReaderAcceptToSSubject = PassthroughSubject() + private let tapToPayCardReaderAcceptToSSubject = PassthroughSubject() private var connectionAttemptInvalidated: Bool = false @@ -64,8 +64,8 @@ extension StripeCardReaderService: CardReaderService { softwareUpdateSubject.eraseToAnyPublisher() } - public var builtInCardReaderAcceptToSEvents: AnyPublisher { - builtInCardReaderAcceptToSSubject.eraseToAnyPublisher() + public var tapToPayCardReaderAcceptToSEvents: AnyPublisher { + tapToPayCardReaderAcceptToSSubject.eraseToAnyPublisher() } // MARK: - CardReaderService conformance. Commands @@ -141,7 +141,7 @@ extension StripeCardReaderService: CardReaderService { DDLogError("\(error)") throw error } - case .localMobile: + case .tapToPay: let tapToPayConfig = TapToPayDiscoveryConfigurationBuilder() do { config = try tapToPayConfig.setSimulated(shouldUseSimulatedCardReader).build() @@ -452,7 +452,7 @@ extension StripeCardReaderService: CardReaderService { connectionAttemptInvalidated = false switch stripeReader.deviceType { case .tapToPay: - return getLocalMobileConfiguration(stripeReader, options: options).flatMap { configuration in + return getTapToPayConfiguration(stripeReader, options: options).flatMap { configuration in self.connect(stripeReader, configuration: configuration) } .share() @@ -494,7 +494,7 @@ extension StripeCardReaderService: CardReaderService { } } - private func getLocalMobileConfiguration(_ reader: StripeTerminal.Reader, + private func getTapToPayConfiguration(_ reader: StripeTerminal.Reader, options: CardReaderConnectionOptions?) -> Future { return Future() { [weak self] promise in guard let self = self else { @@ -507,12 +507,12 @@ extension StripeCardReaderService: CardReaderService { self.readerLocationProvider?.fetchDefaultLocationID { result in switch result { case .success(let locationId): - let localMobileConfig = TapToPayConnectionConfigurationBuilder(delegate: self, locationId: locationId) - localMobileConfig.setMerchantDisplayName(nil) - localMobileConfig.setOnBehalfOf(nil) - localMobileConfig.setTosAcceptancePermitted(options?.builtInOptions?.termsOfServiceAcceptancePermitted ?? true) + let tapToPayConfig = TapToPayConnectionConfigurationBuilder(delegate: self, locationId: locationId) + tapToPayConfig.setMerchantDisplayName(nil) + tapToPayConfig.setOnBehalfOf(nil) + tapToPayConfig.setTosAcceptancePermitted(options?.tapToPayOptions?.termsOfServiceAcceptancePermitted ?? true) do { - let config = try localMobileConfig.build() + let config = try tapToPayConfig.build() return promise(.success(config)) } catch { let underlyingError = Self.logAndDecodeError(error) @@ -1005,7 +1005,7 @@ extension StripeCardReaderService: TapToPayReaderDelegate { } public func tapToPayReaderDidAcceptTermsOfService(_ reader: Reader) { - builtInCardReaderAcceptToSSubject.send(()) + tapToPayCardReaderAcceptToSSubject.send(()) } } diff --git a/Hardware/Hardware/CardReader/StripeCardReader/UnderlyingError+Stripe.swift b/Hardware/Hardware/CardReader/StripeCardReader/UnderlyingError+Stripe.swift index 610ad9d72d7..7b13a3af504 100644 --- a/Hardware/Hardware/CardReader/StripeCardReader/UnderlyingError+Stripe.swift +++ b/Hardware/Hardware/CardReader/StripeCardReader/UnderlyingError+Stripe.swift @@ -93,23 +93,23 @@ extension UnderlyingError { case .passcodeNotEnabled: self = .passcodeNotEnabled case .tapToPayReaderTOSAcceptanceRequiresiCloudSignIn: - self = .appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn + self = .tapToPayReaderTOSAcceptanceRequiresiCloudSignIn case .nfcDisabled: self = .nfcDisabled case .tapToPayReaderFailedToPrepare: - self = .appleBuiltInReaderFailedToPrepare + self = .tapToPayReaderFailedToPrepare case .tapToPayReaderTOSAcceptanceCanceled: - self = .appleBuiltInReaderTOSAcceptanceCanceled + self = .tapToPayReaderTOSAcceptanceCanceled case .tapToPayReaderTOSNotYetAccepted: - self = .appleBuiltInReaderTOSNotYetAccepted + self = .tapToPayReaderTOSNotYetAccepted case .tapToPayReaderTOSAcceptanceFailed: - self = .appleBuiltInReaderTOSAcceptanceFailed + self = .tapToPayReaderTOSAcceptanceFailed case .tapToPayReaderMerchantBlocked: - self = .appleBuiltInReaderMerchantBlocked + self = .tapToPayReaderMerchantBlocked case .tapToPayReaderInvalidMerchant: - self = .appleBuiltInReaderInvalidMerchant + self = .tapToPayReaderInvalidMerchant case .tapToPayReaderDeviceBanned: - self = .appleBuiltInReaderDeviceBanned + self = .tapToPayReaderDeviceBanned case .unsupportedMobileDeviceConfiguration: self = .unsupportedMobileDeviceConfiguration case .readerNotAccessibleInBackground: @@ -171,7 +171,7 @@ extension UnderlyingError { case .bluetoothReconnectStarted: self = .bluetoothReconnectStarted case .tapToPayReaderAccountDeactivated: - self = .appleBuiltInReaderAccountDeactivated + self = .tapToPayReaderAccountDeactivated case .readerMissingEncryptionKeys: self = .readerMissingEncryptionKeys case .unexpectedReaderError: diff --git a/Hardware/Hardware/CardReader/UnderlyingError.swift b/Hardware/Hardware/CardReader/UnderlyingError.swift index 611530e4c6c..bb2bdca0067 100644 --- a/Hardware/Hardware/CardReader/UnderlyingError.swift +++ b/Hardware/Hardware/CardReader/UnderlyingError.swift @@ -161,8 +161,8 @@ public enum UnderlyingError: Error, Equatable { /// The phone must have a signed-in iCloud account in order to accept the TOS for the built in reader. /// The signed-in account does not need to be the one used to connect the reader. - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn - case appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderTOSAcceptanceRequiresiCloudSignIn + case tapToPayReaderTOSAcceptanceRequiresiCloudSignIn /// NFC is disabled on the device. This could be a permissions issue, in particular due to a device management profile. /// It's unlikely that the user can directly correct this issue @@ -170,32 +170,32 @@ public enum UnderlyingError: Error, Equatable { case nfcDisabled /// Preparing Tap to Pay on iPhone failed. This is a retriable error - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderFailedToPrepare - case appleBuiltInReaderFailedToPrepare + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderFailedToPrepare + case tapToPayReaderFailedToPrepare /// The user cancelled Tap to Pay on iPhone Terms of Service acceptance - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderTOSAcceptanceCanceled - case appleBuiltInReaderTOSAcceptanceCanceled + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderTOSAcceptanceCanceled + case tapToPayReaderTOSAcceptanceCanceled /// Tap to Pay on iPhone Terms of Service have not been accepted. This error is retriable - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderTOSNotYetAccepted - case appleBuiltInReaderTOSNotYetAccepted + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderTOSNotYetAccepted + case tapToPayReaderTOSNotYetAccepted /// Tap to Pay on iPhone Terms of Service could not be accepted. This may indicate an issue with the Apple ID used. - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderTOSAcceptanceFailed - case appleBuiltInReaderTOSAcceptanceFailed + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderTOSAcceptanceFailed + case tapToPayReaderTOSAcceptanceFailed /// This (Stripe) merchant account cannot be used with Tap to Pay on iPhone as it has been blocked - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderMerchantBlocked - case appleBuiltInReaderMerchantBlocked + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderMerchantBlocked + case tapToPayReaderMerchantBlocked /// The merchant account is invalid and cannot be used with Tap to Pay on iPhone - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderInvalidMerchant - case appleBuiltInReaderInvalidMerchant + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderInvalidMerchant + case tapToPayReaderInvalidMerchant /// Tap to Pay on iPhone on this device cannot be used because it has been banned - /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorAppleBuiltInReaderDeviceBanned - case appleBuiltInReaderDeviceBanned + /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderDeviceBanned + case tapToPayReaderDeviceBanned /// The device does not meet the minimum requirements for using Tap to Pay on iPhone /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorUnsupportedMobileDeviceConfiguration @@ -317,7 +317,7 @@ public enum UnderlyingError: Error, Equatable { /// The Apple built-in reader account is deactivated. /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorTapToPayReaderAccountDeactivated - case appleBuiltInReaderAccountDeactivated + case tapToPayReaderAccountDeactivated /// The reader is missing encryption keys. /// https://stripe.dev/stripe-terminal-ios/docs/Enums/SCPError.html#/c:@E@SCPError@SCPErrorReaderMissingEncryptionKeys @@ -629,7 +629,7 @@ extension UnderlyingError: LocalizedError { comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "the device does not have a passcode set.") - case .appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn: + case .tapToPayReaderTOSAcceptanceRequiresiCloudSignIn: return NSLocalizedString("Please sign in to iCloud on this device to use Tap to Pay on iPhone.", comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "the device is not signed in to iCloud.") @@ -640,25 +640,25 @@ extension UnderlyingError: LocalizedError { comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "the device's NFC chipset has been disabled by a device management policy.") - case .appleBuiltInReaderFailedToPrepare, .readerNotAccessibleInBackground: + case .tapToPayReaderFailedToPrepare, .readerNotAccessibleInBackground: return NSLocalizedString("There was an issue preparing to use Tap to Pay on iPhone – please try again.", comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "there was some issue with the connection. Retryable.") - case .appleBuiltInReaderTOSAcceptanceCanceled, .appleBuiltInReaderTOSNotYetAccepted: + case .tapToPayReaderTOSAcceptanceCanceled, .tapToPayReaderTOSNotYetAccepted: return NSLocalizedString("Please try again, and accept Apple's Terms of Service, so you can use Tap to " + "Pay on iPhone.", comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "the merchant cancelled or did not complete the Terms of Service acceptance flow") - case .appleBuiltInReaderTOSAcceptanceFailed: + case .tapToPayReaderTOSAcceptanceFailed: return NSLocalizedString("Please check your Apple ID is valid, and then try again. A valid Apple ID is " + "required to accept Apple's Terms of Service.", comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "the Terms of Service acceptance flow failed, possibly due to issues with " + "the Apple ID") - case .appleBuiltInReaderMerchantBlocked, .appleBuiltInReaderInvalidMerchant, .appleBuiltInReaderDeviceBanned: + case .tapToPayReaderMerchantBlocked, .tapToPayReaderInvalidMerchant, .tapToPayReaderDeviceBanned: return NSLocalizedString("Please contact support – there was an issue starting Tap to Pay on iPhone", comment: "Error message shown when Tap to Pay on iPhone cannot be used because " + "there is an issue with the merchant account or device.") @@ -861,9 +861,9 @@ extension UnderlyingError: LocalizedError { comment: "Error message when Bluetooth reconnect has started." ) - case .appleBuiltInReaderAccountDeactivated: + case .tapToPayReaderAccountDeactivated: return NSLocalizedString( - "hardware.cardReader.underlyingError.appleBuiltInReaderAccountDeactivated", + "hardware.cardReader.underlyingError.tapToPayReaderAccountDeactivated", value: "The linked Apple ID account has been deactivated.", comment: "Error message when the Apple built-in reader account is deactivated." ) diff --git a/Hardware/HardwareTests/ErrorCodesTests.swift b/Hardware/HardwareTests/ErrorCodesTests.swift index 20bb9406a85..5a2375148dd 100644 --- a/Hardware/HardwareTests/ErrorCodesTests.swift +++ b/Hardware/HardwareTests/ErrorCodesTests.swift @@ -163,7 +163,7 @@ final class CardReaderServiceErrorTests: XCTestCase { } func test_stripe_TOS_requires_iCloud_signin_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn, domainError(stripeCode: 2960)) + XCTAssertEqual(.tapToPayReaderTOSAcceptanceRequiresiCloudSignIn, domainError(stripeCode: 2960)) } func test_stripe_nfc_disabled_maps_to_expected_error() { @@ -171,31 +171,31 @@ final class CardReaderServiceErrorTests: XCTestCase { } func test_stripe_built_in_reader_failed_to_prepare_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderFailedToPrepare, domainError(stripeCode: 3910)) + XCTAssertEqual(.tapToPayReaderFailedToPrepare, domainError(stripeCode: 3910)) } func test_stripe_TOS_acceptance_cancelled_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderTOSAcceptanceCanceled, domainError(stripeCode: 2970)) + XCTAssertEqual(.tapToPayReaderTOSAcceptanceCanceled, domainError(stripeCode: 2970)) } func test_stripe_TOS_not_yet_accepted_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderTOSNotYetAccepted, domainError(stripeCode: 3930)) + XCTAssertEqual(.tapToPayReaderTOSNotYetAccepted, domainError(stripeCode: 3930)) } func test_stripe_TOS_acceptance_failed_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderTOSAcceptanceFailed, domainError(stripeCode: 3940)) + XCTAssertEqual(.tapToPayReaderTOSAcceptanceFailed, domainError(stripeCode: 3940)) } func test_stripe_merchant_blocked_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderMerchantBlocked, domainError(stripeCode: 3950)) + XCTAssertEqual(.tapToPayReaderMerchantBlocked, domainError(stripeCode: 3950)) } func test_stripe_invalid_merchant_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderInvalidMerchant, domainError(stripeCode: 3960)) + XCTAssertEqual(.tapToPayReaderInvalidMerchant, domainError(stripeCode: 3960)) } func test_stripe_device_banned_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderDeviceBanned, domainError(stripeCode: 3920)) + XCTAssertEqual(.tapToPayReaderDeviceBanned, domainError(stripeCode: 3920)) } func test_stripe_unsupported_mobile_device_maps_to_expected_error() { @@ -315,7 +315,7 @@ final class CardReaderServiceErrorTests: XCTestCase { } func test_stripe_apple_built_in_reader_account_deactivated_maps_to_expected_error() { - XCTAssertEqual(.appleBuiltInReaderAccountDeactivated, domainError(stripeCode: 3970)) + XCTAssertEqual(.tapToPayReaderAccountDeactivated, domainError(stripeCode: 3970)) } func test_stripe_reader_missing_encryption_keys_maps_to_expected_error() { diff --git a/Storage/Storage/Model/CardReaderType.swift b/Storage/Storage/Model/CardReaderType.swift index d5b847724f3..5cd8fce586d 100644 --- a/Storage/Storage/Model/CardReaderType.swift +++ b/Storage/Storage/Model/CardReaderType.swift @@ -10,7 +10,7 @@ public enum CardReaderType: String, Codable { /// BBPOS WisePad 3 case wisepad3 /// Tap on Mobile: Apple built in reader - case appleBuiltIn + case tapToPay /// Other case other } diff --git a/WooCommerce/Classes/Analytics/TracksProvider.swift b/WooCommerce/Classes/Analytics/TracksProvider.swift index 3bb01489378..7d198a7026d 100644 --- a/WooCommerce/Classes/Analytics/TracksProvider.swift +++ b/WooCommerce/Classes/Analytics/TracksProvider.swift @@ -148,13 +148,13 @@ private extension TracksProvider { // Card Reader Connection WooAnalyticsStat.cardReaderSelectTypeShown, - WooAnalyticsStat.cardReaderSelectTypeBuiltInTapped, + WooAnalyticsStat.cardReaderSelectTypeTapToPayTapped, WooAnalyticsStat.cardReaderSelectTypeBluetoothTapped, WooAnalyticsStat.cardReaderDiscoveryFailed, WooAnalyticsStat.cardReaderConnectionFailed, WooAnalyticsStat.cardReaderConnectionSuccess, WooAnalyticsStat.cardReaderDisconnectTapped, - WooAnalyticsStat.manageCardReadersBuiltInReaderAutoDisconnect, + WooAnalyticsStat.manageCardReadersTapToPayReaderAutoDisconnect, WooAnalyticsStat.cardReaderAutomaticDisconnect, WooAnalyticsStat.cardReaderLocationPermissionPreAlertShown, WooAnalyticsStat.cardReaderLocationPermissionRequiredShown, diff --git a/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift b/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift index 2a521473b41..edbbe1152df 100644 --- a/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift +++ b/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift @@ -1257,7 +1257,7 @@ extension WooAnalyticsEvent { enum CardReaderType: String { case external - case builtIn = "built_in" + case tapToPay = "built_in" } /// Common event keys @@ -1436,8 +1436,8 @@ extension WooAnalyticsEvent { /// - forGatewayID: the plugin (e.g. "woocommerce-payments" or "woocommerce-gateway-stripe") to be included in the event properties in Tracks. /// - countryCode: the country code of the store. /// - static func cardReaderSelectTypeBuiltInTapped(forGatewayID: String?, countryCode: CountryCode) -> WooAnalyticsEvent { - WooAnalyticsEvent(statName: .cardReaderSelectTypeBuiltInTapped, + static func cardReaderSelectTypeTapToPayTapped(forGatewayID: String?, countryCode: CountryCode) -> WooAnalyticsEvent { + WooAnalyticsEvent(statName: .cardReaderSelectTypeTapToPayTapped, properties: [ Keys.countryCode: countryCode.rawValue, Keys.gatewayID: safeGatewayID(for: forGatewayID) @@ -1467,8 +1467,8 @@ extension WooAnalyticsEvent { /// - forGatewayID: the plugin (e.g. "woocommerce-payments" or "woocommerce-gateway-stripe") to be included in the event properties in Tracks. /// - countryCode: the country code of the store. /// - static func manageCardReadersBuiltInReaderAutoDisconnect(forGatewayID: String?, countryCode: CountryCode) -> WooAnalyticsEvent { - WooAnalyticsEvent(statName: .manageCardReadersBuiltInReaderAutoDisconnect, + static func manageCardReadersTapToPayReaderAutoDisconnect(forGatewayID: String?, countryCode: CountryCode) -> WooAnalyticsEvent { + WooAnalyticsEvent(statName: .manageCardReadersTapToPayReaderAutoDisconnect, properties: [ Keys.countryCode: countryCode.rawValue, Keys.gatewayID: safeGatewayID(for: forGatewayID) diff --git a/WooCommerce/Classes/Analytics/WooAnalyticsStat.swift b/WooCommerce/Classes/Analytics/WooAnalyticsStat.swift index 0fccc3acbc8..fd6d62acfb2 100644 --- a/WooCommerce/Classes/Analytics/WooAnalyticsStat.swift +++ b/WooCommerce/Classes/Analytics/WooAnalyticsStat.swift @@ -359,13 +359,13 @@ enum WooAnalyticsStat: String { // MARK: Card Reader Connection Events // case cardReaderSelectTypeShown = "card_present_select_reader_type_shown" - case cardReaderSelectTypeBuiltInTapped = "card_present_select_reader_type_built_in_tapped" + case cardReaderSelectTypeTapToPayTapped = "card_present_select_reader_type_built_in_tapped" case cardReaderSelectTypeBluetoothTapped = "card_present_select_reader_type_bluetooth_tapped" case cardReaderDiscoveryFailed = "card_reader_discovery_failed" case cardReaderConnectionFailed = "card_reader_connection_failed" case cardReaderConnectionSuccess = "card_reader_connection_success" case cardReaderDisconnectTapped = "card_reader_disconnect_tapped" - case manageCardReadersBuiltInReaderAutoDisconnect = "manage_card_readers_automatic_disconnect_built_in_reader" + case manageCardReadersTapToPayReaderAutoDisconnect = "manage_card_readers_automatic_disconnect_built_in_reader" case cardReaderAutomaticDisconnect = "card_reader_automatic_disconnect" case cardReaderLocationPermissionPreAlertShown = "card_reader_location_permission_pre_alert_shown" case cardReaderLocationPermissionRequiredShown = "card_reader_location_permission_required_shown" diff --git a/WooCommerce/Classes/Extensions/UIImage+Woo.swift b/WooCommerce/Classes/Extensions/UIImage+Woo.swift index 809003ead6a..277ffb3c83a 100644 --- a/WooCommerce/Classes/Extensions/UIImage+Woo.swift +++ b/WooCommerce/Classes/Extensions/UIImage+Woo.swift @@ -1326,32 +1326,32 @@ extension UIImage { return UIImage(named: "card-payments-select-reader-type")! } - /// Preparing built-in card reader: intended for use before we're ready to take payment + /// Preparing tap-to-pay card reader: intended for use before we're ready to take payment /// - static var preparingBuiltInReader: UIImage { - return UIImage(named: "built-in-reader-preparing")! + static var preparingTapToPayReader: UIImage { + return UIImage(named: "tap-to-pay-reader-preparing")! } - /// Built-in reader Processing: intended for use when a payment is + /// Tap to Pay reader Processing: intended for use when a payment is /// underway with the iPhone's built in reader. /// - static var builtInReaderProcessing: UIImage { - return UIImage(named: "built-in-reader-processing")! + static var tapToPayReaderProcessing: UIImage { + return UIImage(named: "tap-to-pay-reader-processing")! } - /// Built-in reader Success: intended for use when a transaction is complete - /// with the built-in reader + /// Tap to Pay reader Success: intended for use when a transaction is complete + /// with the tap-to-pay reader /// - static var builtInReaderSuccess: UIImage { - return UIImage(named: "built-in-reader-payment-success")! + static var tapToPayReaderSuccess: UIImage { + return UIImage(named: "tap-to-pay-reader-payment-success")! } - static var builtInReaderError: UIImage { - return UIImage(named: "built-in-reader-error")! + static var tapToPayReaderError: UIImage { + return UIImage(named: "tap-to-pay-reader-error")! } - static var setUpBuiltInReader: UIImage { - return UIImage(named: "built-in-reader-set-up")! + static var setUpTapToPayReader: UIImage { + return UIImage(named: "tap-to-pay-reader-set-up")! } static var shippingIcon: UIImage { diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentCollectOrderPaymentUseCaseAdaptor.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentCollectOrderPaymentUseCaseAdaptor.swift index ec0023d9214..22a8b3723a5 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentCollectOrderPaymentUseCaseAdaptor.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentCollectOrderPaymentUseCaseAdaptor.swift @@ -27,7 +27,7 @@ final class CardPresentPaymentCollectOrderPaymentUseCaseAdaptor { using connectionMethod: CardReaderConnectionMethod, siteID: Int64, preflightController: CardPresentPaymentPreflightController< - CardPresentPaymentBuiltInReaderConnectionAlertsProvider, + CardPresentPaymentTapToPayReaderConnectionAlertsProvider, CardPresentPaymentBluetoothReaderConnectionAlertsProvider, CardPresentPaymentsAlertPresenterAdaptor>, onboardingPresenter: CardPresentPaymentsOnboardingPresenting, diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentPreflightAdaptor.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentPreflightAdaptor.swift index d8f0ba60f81..2267d8f3e0d 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentPreflightAdaptor.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentPreflightAdaptor.swift @@ -7,11 +7,11 @@ protocol CardPresentPaymentPreflightControllerFacade { } final class CardPresentPaymentPreflightAdaptor: CardPresentPaymentPreflightControllerFacade { - private let preflightController: CardPresentPaymentPreflightController - init(preflightController: CardPresentPaymentPreflightController) { self.preflightController = preflightController diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentReaderConnectionResult.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentReaderConnectionResult.swift index cb8ea85b783..c76c29f01aa 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentReaderConnectionResult.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentReaderConnectionResult.swift @@ -13,7 +13,7 @@ extension CardReaderConnectionMethod { case .bluetooth: return .bluetoothScan case .tapToPay: - return .localMobile + return .tapToPay } } } diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentService.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentService.swift index 18d2c8ec348..f713eab1086 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentService.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentService.swift @@ -212,10 +212,10 @@ private extension CardPresentPaymentService { } func createPreflightController() -> CardPresentPaymentPreflightController< - CardPresentPaymentBuiltInReaderConnectionAlertsProvider, + CardPresentPaymentTapToPayReaderConnectionAlertsProvider, CardPresentPaymentBluetoothReaderConnectionAlertsProvider, CardPresentPaymentsAlertPresenterAdaptor> { - let alertProvider = CardPresentPaymentBuiltInReaderConnectionAlertsProvider() + let alertProvider = CardPresentPaymentTapToPayReaderConnectionAlertsProvider() return CardPresentPaymentPreflightController( siteID: siteID, configuration: cardPresentPaymentsConfiguration, @@ -226,7 +226,7 @@ private extension CardPresentPaymentService { externalReaderConnectionController: connectionControllerManager.externalReaderConnectionController, tapToPayConnectionController: connectionControllerManager.tapToPayConnectionController, tapToPayReconnectionController: TapToPayReconnectionController( - connectionControllerFactory: BuiltInCardReaderConnectionControllerFactory( + connectionControllerFactory: TapToPayCardReaderConnectionControllerFactory( alertProvider: alertProvider)), analyticsTracker: connectionControllerManager.analyticsTracker) } diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift similarity index 97% rename from WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift rename to WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift index 78db1ffa2b0..13a1dafb581 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift @@ -1,6 +1,6 @@ import Foundation -struct CardPresentPaymentBuiltInReaderConnectionAlertsProvider: CardReaderConnectionAlertsProviding { +struct CardPresentPaymentTapToPayReaderConnectionAlertsProvider: CardReaderConnectionAlertsProviding { typealias AlertDetails = CardPresentPaymentEventDetails func scanningForReader(cancel: @escaping () -> Void) -> CardPresentPaymentEventDetails { .scanningForReaders(endSearch: cancel) diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsConnectionControllerManager.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsConnectionControllerManager.swift index 02deef708fb..c391930139b 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsConnectionControllerManager.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsConnectionControllerManager.swift @@ -4,7 +4,7 @@ import struct Yosemite.CardPresentPaymentsConfiguration final class CardPresentPaymentsConnectionControllerManager { let externalReaderConnectionController: CardReaderConnectionController - let tapToPayConnectionController: BuiltInCardReaderConnectionController let analyticsTracker: CardReaderConnectionAnalyticsTracker @@ -27,10 +27,10 @@ final class CardPresentPaymentsConnectionControllerManager { alertsProvider: CardPresentPaymentBluetoothReaderConnectionAlertsProvider(), configuration: configuration, analyticsTracker: analyticsTracker) - self.tapToPayConnectionController = BuiltInCardReaderConnectionController( + self.tapToPayConnectionController = TapToPayCardReaderConnectionController( forSiteID: siteID, alertsPresenter: alertsPresenter, - alertsProvider: CardPresentPaymentBuiltInReaderConnectionAlertsProvider(), + alertsProvider: CardPresentPaymentTapToPayReaderConnectionAlertsProvider(), configuration: configuration, analyticsTracker: analyticsTracker) } diff --git a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsRetryApproach.swift b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsRetryApproach.swift index 001e697d11b..e764cde2779 100644 --- a/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsRetryApproach.swift +++ b/WooCommerce/Classes/POS/Card Present Payments/CardPresentPaymentsRetryApproach.swift @@ -84,11 +84,11 @@ private extension CardReaderServiceUnderlyingError { .incompleteStoreAddress, .invalidPostalCode, .passcodeNotEnabled, - .appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn, - .appleBuiltInReaderFailedToPrepare, - .appleBuiltInReaderTOSAcceptanceCanceled, - .appleBuiltInReaderTOSNotYetAccepted, - .appleBuiltInReaderTOSAcceptanceFailed, + .tapToPayReaderTOSAcceptanceRequiresiCloudSignIn, + .tapToPayReaderFailedToPrepare, + .tapToPayReaderTOSAcceptanceCanceled, + .tapToPayReaderTOSNotYetAccepted, + .tapToPayReaderTOSAcceptanceFailed, .readerNotAccessibleInBackground, .commandNotAllowedDuringCall, .invalidAmount, @@ -109,7 +109,7 @@ private extension CardReaderServiceUnderlyingError { .unknownReaderIpAddress, .internetConnectTimeOut, .bluetoothReconnectStarted, - .appleBuiltInReaderAccountDeactivated, + .tapToPayReaderAccountDeactivated, .readerMissingEncryptionKeys, .unexpectedReaderError, .commandRequiresCardholderConsent, @@ -139,9 +139,9 @@ private extension CardReaderServiceUnderlyingError { .connectionAttemptInvalidated, .noActivePaymentIntent, .nfcDisabled, - .appleBuiltInReaderMerchantBlocked, - .appleBuiltInReaderInvalidMerchant, - .appleBuiltInReaderDeviceBanned, + .tapToPayReaderMerchantBlocked, + .tapToPayReaderInvalidMerchant, + .tapToPayReaderDeviceBanned, .unsupportedMobileDeviceConfiguration, .readerIncompatible, .invalidClientSecret, diff --git a/WooCommerce/Classes/ServiceLocator/ServiceLocator.swift b/WooCommerce/Classes/ServiceLocator/ServiceLocator.swift index 1e78ded0092..6fec03c0396 100644 --- a/WooCommerce/Classes/ServiceLocator/ServiceLocator.swift +++ b/WooCommerce/Classes/ServiceLocator/ServiceLocator.swift @@ -100,9 +100,9 @@ final class ServiceLocator { private static var _cardPresentPaymentsOnboardingIPPUsersRefresher: CardPresentPaymentsOnboardingIPPUsersRefresher = CardPresentPaymentsOnboardingIPPUsersRefresher() - private static var _tapToPayReconnectionController = TapToPayReconnectionController( - connectionControllerFactory: BuiltInCardReaderConnectionControllerFactory( - alertProvider: BuiltInReaderConnectionAlertsProvider())) + private static var _tapToPayReconnectionController = TapToPayReconnectionController( + connectionControllerFactory: TapToPayCardReaderConnectionControllerFactory( + alertProvider: TapToPayReaderConnectionAlertsProvider())) /// Tracker for app startup waiting time /// @@ -256,7 +256,7 @@ final class ServiceLocator { _cardPresentPaymentsOnboardingIPPUsersRefresher } - static var tapToPayReconnectionController: TapToPayReconnectionController { _tapToPayReconnectionController } diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSelectSearchType.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSelectSearchType.swift index 8a9a61ac076..a37572c74fe 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSelectSearchType.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalSelectSearchType.swift @@ -47,7 +47,7 @@ final class CardPresentModalSelectSearchType: CardPresentPaymentsModalViewModel cancelAction: @escaping () -> Void) { textMode = .fullInfo actionsMode = .twoActionAndAuxiliary - primaryButtonTitle = CardReaderDiscoveryMethod.localMobile.name + primaryButtonTitle = CardReaderDiscoveryMethod.tapToPay.name self.tapOnIphoneAction = tapOnIPhoneAction secondaryButtonTitle = CardReaderDiscoveryMethod.bluetoothScan.name self.bluetoothScanAction = bluetoothAction @@ -81,7 +81,7 @@ private extension CardReaderDiscoveryMethod { return NSLocalizedString( "Bluetooth Reader", comment: "The button title on the reader type alert, for the user to choose a bluetooth reader.") - case .localMobile: + case .tapToPay: return NSLocalizedString( "Tap to Pay on iPhone", comment: "The button title on the reader type alert, for the user to choose Tap to Pay on iPhone.") diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConfigurationProgress.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConfigurationProgress.swift similarity index 92% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConfigurationProgress.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConfigurationProgress.swift index 43d39864a96..98657f06641 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConfigurationProgress.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConfigurationProgress.swift @@ -2,7 +2,7 @@ import UIKit /// Modal presented when a firmware update is being installed /// -final class CardPresentModalBuiltInConfigurationProgress: CardPresentPaymentsModalViewModel, CardPresentModalProgressDisplaying { +final class CardPresentModalTapToPayConfigurationProgress: CardPresentPaymentsModalViewModel, CardPresentModalProgressDisplaying { /// Called when cancel button is tapped private let cancelAction: (() -> Void)? @@ -51,7 +51,7 @@ final class CardPresentModalBuiltInConfigurationProgress: CardPresentPaymentsMod func didTapAuxiliaryButton(in viewController: UIViewController?) {} } -private extension CardPresentModalBuiltInConfigurationProgress { +private extension CardPresentModalTapToPayConfigurationProgress { enum Localization { static let title = NSLocalizedString( "Configuring iPhone", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingFailed.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingFailed.swift similarity index 87% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingFailed.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingFailed.swift index d960c085cbd..d7bd42857be 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingFailed.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingFailed.swift @@ -3,7 +3,7 @@ import Yosemite /// Modal presented when an error occurs while connecting to a reader /// -final class CardPresentModalBuiltInConnectingFailed: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPayConnectingFailed: CardPresentPaymentsModalViewModel { private let continueSearchAction: () -> Void private let cancelSearchAction: () -> Void @@ -14,7 +14,7 @@ final class CardPresentModalBuiltInConnectingFailed: CardPresentPaymentsModalVie var topSubtitle: String? = nil - let image: UIImage = .builtInReaderError + let image: UIImage = .tapToPayReaderError let primaryButtonTitle: String? = Localization.tryAgain @@ -38,7 +38,7 @@ final class CardPresentModalBuiltInConnectingFailed: CardPresentPaymentsModalVie switch error { case CardReaderServiceError.connection(_): - bottomTitle = builtInReaderDescription(for: error) + bottomTitle = tapToPayReaderDescription(for: error) default: break } @@ -55,7 +55,7 @@ final class CardPresentModalBuiltInConnectingFailed: CardPresentPaymentsModalVie func didTapAuxiliaryButton(in viewController: UIViewController?) { } } -extension CardPresentModalBuiltInConnectingFailed: ReaderConnectionUnderlyingErrorDisplaying { +extension CardPresentModalTapToPayConnectingFailed: ReaderConnectionUnderlyingErrorDisplaying { func errorDescription(underlyingError: CardReaderServiceUnderlyingError) -> String? { switch underlyingError { case .internalServiceError: @@ -69,7 +69,7 @@ extension CardPresentModalBuiltInConnectingFailed: ReaderConnectionUnderlyingErr } } -private extension CardPresentModalBuiltInConnectingFailed { +private extension CardPresentModalTapToPayConnectingFailed { enum Localization { static let title = NSLocalizedString( "Setup failed", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingFailedNonRetryable.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingFailedNonRetryable.swift similarity index 84% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingFailedNonRetryable.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingFailedNonRetryable.swift index 9d5e1753a60..6949c70ed3b 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingFailedNonRetryable.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingFailedNonRetryable.swift @@ -3,7 +3,7 @@ import Yosemite /// Modal presented when an error occurs while connecting to a reader /// -final class CardPresentModalBuiltInConnectingFailedNonRetryable: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPayConnectingFailedNonRetryable: CardPresentPaymentsModalViewModel { private let closeAction: () -> Void let textMode: PaymentsModalTextMode = .reducedTopInfo @@ -13,7 +13,7 @@ final class CardPresentModalBuiltInConnectingFailedNonRetryable: CardPresentPaym var topSubtitle: String? = nil - let image: UIImage = .builtInReaderError + let image: UIImage = .tapToPayReaderError let primaryButtonTitle: String? = Localization.close @@ -35,7 +35,7 @@ final class CardPresentModalBuiltInConnectingFailedNonRetryable: CardPresentPaym switch error { case CardReaderServiceError.connection(_): - bottomTitle = builtInReaderDescription(for: error) + bottomTitle = tapToPayReaderDescription(for: error) default: break } @@ -50,7 +50,7 @@ final class CardPresentModalBuiltInConnectingFailedNonRetryable: CardPresentPaym func didTapAuxiliaryButton(in viewController: UIViewController?) { } } -extension CardPresentModalBuiltInConnectingFailedNonRetryable: ReaderConnectionUnderlyingErrorDisplaying { +extension CardPresentModalTapToPayConnectingFailedNonRetryable: ReaderConnectionUnderlyingErrorDisplaying { func errorDescription(underlyingError: CardReaderServiceUnderlyingError) -> String? { switch underlyingError { case .internalServiceError: @@ -64,7 +64,7 @@ extension CardPresentModalBuiltInConnectingFailedNonRetryable: ReaderConnectionU } } -private extension CardPresentModalBuiltInConnectingFailedNonRetryable { +private extension CardPresentModalTapToPayConnectingFailedNonRetryable { enum Localization { static let title = NSLocalizedString( "Setup failed", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingToReader.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingToReader.swift similarity index 86% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingToReader.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingToReader.swift index 5bc7db3ee5c..1cccaec392b 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInConnectingToReader.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayConnectingToReader.swift @@ -2,7 +2,7 @@ import UIKit /// Modal presented when we are connecting to a reader /// -final class CardPresentModalBuiltInConnectingToReader: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPayConnectingToReader: CardPresentPaymentsModalViewModel { let textMode: PaymentsModalTextMode = .fullInfo let actionsMode: PaymentsModalActionsMode = .none @@ -10,7 +10,7 @@ final class CardPresentModalBuiltInConnectingToReader: CardPresentPaymentsModalV var topSubtitle: String? - let image: UIImage = .preparingBuiltInReader + let image: UIImage = .preparingTapToPayReader let primaryButtonTitle: String? = nil @@ -35,7 +35,7 @@ final class CardPresentModalBuiltInConnectingToReader: CardPresentPaymentsModalV func didTapAuxiliaryButton(in viewController: UIViewController?) {} } -private extension CardPresentModalBuiltInConnectingToReader { +private extension CardPresentModalTapToPayConnectingToReader { enum Localization { static let title = NSLocalizedString( "Preparing Tap to Pay on iPhone", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInFollowReaderInstructions.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayFollowReaderInstructions.swift similarity index 90% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInFollowReaderInstructions.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayFollowReaderInstructions.swift index 2464364935f..cb21596bb31 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInFollowReaderInstructions.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayFollowReaderInstructions.swift @@ -3,7 +3,7 @@ import Yosemite /// Modal presented under the Apple-provided built in reader modal, while the card is being collected. /// This may be visible for a moment or two either side of Apple's screen being shown. -final class CardPresentModalBuiltInFollowReaderInstructions: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPayFollowReaderInstructions: CardPresentPaymentsModalViewModel { /// Customer name private let name: String @@ -22,7 +22,7 @@ final class CardPresentModalBuiltInFollowReaderInstructions: CardPresentPayments amount } - let image: UIImage = .preparingBuiltInReader + let image: UIImage = .preparingTapToPayReader let primaryButtonTitle: String? = nil @@ -61,7 +61,7 @@ final class CardPresentModalBuiltInFollowReaderInstructions: CardPresentPayments } } -private extension CardPresentModalBuiltInFollowReaderInstructions { +private extension CardPresentModalTapToPayFollowReaderInstructions { enum Localization { static let readerIsReady = NSLocalizedString( "Tap to Pay on iPhone is ready", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInReaderCheckingDeviceSupport.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayReaderCheckingDeviceSupport.swift similarity index 91% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInReaderCheckingDeviceSupport.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayReaderCheckingDeviceSupport.swift index 6f0714f31d3..67cc7d0a12f 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInReaderCheckingDeviceSupport.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayReaderCheckingDeviceSupport.swift @@ -2,7 +2,7 @@ import UIKit /// Modal presented when we are scanning for a reader to connect to /// -final class CardPresentModalBuiltInReaderCheckingDeviceSupport: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPayReaderCheckingDeviceSupport: CardPresentPaymentsModalViewModel { /// Called when cancel button is tapped private let cancelAction: () -> Void @@ -13,7 +13,7 @@ final class CardPresentModalBuiltInReaderCheckingDeviceSupport: CardPresentPayme var topSubtitle: String? - let image: UIImage = .preparingBuiltInReader + let image: UIImage = .preparingTapToPayReader let primaryButtonTitle: String? = nil @@ -50,7 +50,7 @@ final class CardPresentModalBuiltInReaderCheckingDeviceSupport: CardPresentPayme } } -private extension CardPresentModalBuiltInReaderCheckingDeviceSupport { +private extension CardPresentModalTapToPayReaderCheckingDeviceSupport { enum Constants { static let learnMoreURL = WooConstants.URLs.inPersonPaymentsLearnMoreWCPay } diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInReaderProcessing.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayReaderProcessing.swift similarity index 88% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInReaderProcessing.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayReaderProcessing.swift index 3d25a088c42..1aee2d3514b 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInReaderProcessing.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPayReaderProcessing.swift @@ -2,7 +2,7 @@ import UIKit /// Modal presented while processing a payment -final class CardPresentModalBuiltInReaderProcessing: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPayReaderProcessing: CardPresentPaymentsModalViewModel { /// Customer name private let name: String @@ -21,7 +21,7 @@ final class CardPresentModalBuiltInReaderProcessing: CardPresentPaymentsModalVie amount } - let image: UIImage = .builtInReaderProcessing + let image: UIImage = .tapToPayReaderProcessing let primaryButtonTitle: String? = nil @@ -55,7 +55,7 @@ final class CardPresentModalBuiltInReaderProcessing: CardPresentPaymentsModalVie } } -private extension CardPresentModalBuiltInReaderProcessing { +private extension CardPresentModalTapToPayReaderProcessing { enum Localization { static let processingPayment = NSLocalizedString( "Processing payment...", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccess.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccess.swift similarity index 94% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccess.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccess.swift index 0b416c8d137..9d1344a0d5c 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccess.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccess.swift @@ -3,7 +3,7 @@ import UIKit /// Modal presented when the payment has been collected successfully /// No customer attached to order therefore an email receipt is not sent automatically /// Email receipt can be sent after payment -final class CardPresentModalBuiltInSuccess: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPaySuccess: CardPresentPaymentsModalViewModel { /// Closure to execute when primary button is tapped private let printReceiptAction: () -> Void @@ -22,7 +22,7 @@ final class CardPresentModalBuiltInSuccess: CardPresentPaymentsModalViewModel { var topSubtitle: String? = nil - let image: UIImage = .builtInReaderSuccess + let image: UIImage = .tapToPayReaderSuccess let primaryButtonTitle: String? = Localization.printReceipt @@ -63,7 +63,7 @@ final class CardPresentModalBuiltInSuccess: CardPresentPaymentsModalViewModel { } } -private extension CardPresentModalBuiltInSuccess { +private extension CardPresentModalTapToPaySuccess { enum Localization { static let paymentSuccessful = NSLocalizedString( "Payment successful", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccessEmailSent.swift similarity index 94% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccessEmailSent.swift index 9be9bc82492..55eabab252f 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessEmailSent.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccessEmailSent.swift @@ -2,7 +2,7 @@ import UIKit /// Modal presented when the payment has been collected successfully /// Customer attached to order therefore an email receipt is sent automatically -final class CardPresentModalBuiltInSuccessEmailSent: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPaySuccessEmailSent: CardPresentPaymentsModalViewModel { /// Closure to execute when primary button is tapped private let printReceiptAction: () -> Void @@ -17,7 +17,7 @@ final class CardPresentModalBuiltInSuccessEmailSent: CardPresentPaymentsModalVie let topSubtitle: String? = nil - let image: UIImage = .builtInReaderSuccess + let image: UIImage = .tapToPayReaderSuccess let primaryButtonTitle: String? = CardPresentModalSuccess.Localization.printReceipt diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessWithoutEmail.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccessWithoutEmail.swift similarity index 92% rename from WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessWithoutEmail.swift rename to WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccessWithoutEmail.swift index 24659810ee4..0008012d853 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalBuiltInSuccessWithoutEmail.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalTapToPaySuccessWithoutEmail.swift @@ -3,7 +3,7 @@ import UIKit /// Modal presented when the payment has been collected successfully /// No customer attached to order therefore an email receipt is not sent automatically /// Email receipt cannot be sent after the payment due to missing email client and too low WooCommerce API version -final class CardPresentModalBuiltInSuccessWithoutEmail: CardPresentPaymentsModalViewModel { +final class CardPresentModalTapToPaySuccessWithoutEmail: CardPresentPaymentsModalViewModel { /// Closure to execute when primary button is tapped private let printReceiptAction: () -> Void @@ -18,7 +18,7 @@ final class CardPresentModalBuiltInSuccessWithoutEmail: CardPresentPaymentsModal var topSubtitle: String? = nil - let image: UIImage = .builtInReaderSuccess + let image: UIImage = .tapToPayReaderSuccess let primaryButtonTitle: String? = Localization.printReceipt @@ -55,7 +55,7 @@ final class CardPresentModalBuiltInSuccessWithoutEmail: CardPresentPaymentsModal func didTapAuxiliaryButton(in viewController: UIViewController?) {} } -private extension CardPresentModalBuiltInSuccessWithoutEmail { +private extension CardPresentModalTapToPaySuccessWithoutEmail { enum Localization { static let paymentSuccessful = NSLocalizedString( "Payment successful", diff --git a/WooCommerce/Classes/ViewModels/CardPresentPayments/ReaderConnectionUnderlyingErrorDisplaying.swift b/WooCommerce/Classes/ViewModels/CardPresentPayments/ReaderConnectionUnderlyingErrorDisplaying.swift index 84d63daec29..915a23f1794 100644 --- a/WooCommerce/Classes/ViewModels/CardPresentPayments/ReaderConnectionUnderlyingErrorDisplaying.swift +++ b/WooCommerce/Classes/ViewModels/CardPresentPayments/ReaderConnectionUnderlyingErrorDisplaying.swift @@ -6,7 +6,7 @@ protocol ReaderConnectionUnderlyingErrorDisplaying { } extension ReaderConnectionUnderlyingErrorDisplaying { - func builtInReaderDescription(for error: Error) -> String? { + func tapToPayReaderDescription(for error: Error) -> String? { if let error = error as? CardReaderServiceError { switch error { case .connection(let underlyingError), diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentPreflightController.swift b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentPreflightController.swift index 00ac8ba6703..d55a007658d 100644 --- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentPreflightController.swift +++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentPreflightController.swift @@ -65,7 +65,7 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, /// Controller to connect a card reader. /// - private var builtInConnectionController: BuiltInCardReaderConnectionController + private var tapToPayConnectionController: TapToPayCardReaderConnectionController private var tapToPayAlertProvider: TapToPayAlertProvider @@ -88,7 +88,7 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, onboardingPresenter: CardPresentPaymentsOnboardingPresenting, tapToPayAlertProvider: TapToPayAlertProvider, externalReaderConnectionController: CardReaderConnectionController, - tapToPayConnectionController: BuiltInCardReaderConnectionController, + tapToPayConnectionController: TapToPayCardReaderConnectionController, tapToPayReconnectionController: TapToPayReconnectionController, analyticsTracker: CardReaderConnectionAnalyticsTracker, stores: StoresManager = ServiceLocator.stores, @@ -105,7 +105,7 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, self.analyticsTracker = analyticsTracker self.tapToPayAlertProvider = tapToPayAlertProvider self.connectionController = externalReaderConnectionController - self.builtInConnectionController = tapToPayConnectionController + self.tapToPayConnectionController = tapToPayConnectionController self.supportDeterminer = CardReaderSupportDeterminer(siteID: siteID, configuration: configuration, stores: stores) } @@ -180,9 +180,9 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, guard !tapToPayReconnectionController.isReconnecting else { return adoptReconnection(using: paymentGatewayAccount) } - let localMobileReaderSupported = await supportDeterminer.deviceSupportsLocalMobileReader() && supportDeterminer.siteSupportsLocalMobileReader() + let tapToPayReaderSupported = await supportDeterminer.deviceSupportsTapToPayReader() && supportDeterminer.siteSupportsTapToPayReader() - switch (discoveryMethod, localMobileReaderSupported) { + switch (discoveryMethod, tapToPayReaderSupported) { case (.none, true): await promptForReaderTypeSelection(paymentGatewayAccount: paymentGatewayAccount) case (.bluetoothScan, _), @@ -190,12 +190,12 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, connectionController.searchAndConnect(onCompletion: { [weak self] result in self?.handleConnectionResult(result, paymentGatewayAccount: paymentGatewayAccount) }) - case (.localMobile, true): - builtInConnectionController.searchAndConnect(onCompletion: { [weak self] result in + case (.tapToPay, true): + tapToPayConnectionController.searchAndConnect(onCompletion: { [weak self] result in self?.handleConnectionResult(result, paymentGatewayAccount: paymentGatewayAccount) }) - case (.localMobile, false): - handlePreflightFailure(error: CardPresentPaymentPreflightError.localMobileReaderNotSupported) + case (.tapToPay, false): + handlePreflightFailure(error: CardPresentPaymentPreflightError.tapToPayReaderNotSupported) } } @@ -208,7 +208,7 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, try await self?.automaticallyDisconnectFromReader() await self?.startReaderConnection(using: paymentGatewayAccount) } - case .localMobile, .none: + case .tapToPay, .none: self.handleConnectionResult(result, paymentGatewayAccount: paymentGatewayAccount) } } @@ -220,10 +220,10 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, countryCode: configuration.countryCode)) alertsPresenter.present(viewModel: tapToPayAlertProvider.selectSearchType(tapToPay: {[weak self] in guard let self = self else { return } - self.analytics.track(event: .InPersonPayments.cardReaderSelectTypeBuiltInTapped( + self.analytics.track(event: .InPersonPayments.cardReaderSelectTypeTapToPayTapped( forGatewayID: paymentGatewayAccount.gatewayID, countryCode: self.configuration.countryCode)) - self.builtInConnectionController.searchAndConnect(onCompletion: { [weak self] result in + self.tapToPayConnectionController.searchAndConnect(onCompletion: { [weak self] result in self?.handleConnectionResult(result, paymentGatewayAccount: paymentGatewayAccount) }) }, bluetooth: { [weak self] in @@ -290,5 +290,5 @@ where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, enum CardPresentPaymentPreflightError: Error, Equatable { case paymentGatewayAccountNotFound case failedToAutomaticallyDisconnect(reader: CardReader) - case localMobileReaderNotSupported + case tapToPayReaderNotSupported } diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardReaderConnectionAnalyticsTracker.swift b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardReaderConnectionAnalyticsTracker.swift index 30e65f68eab..6a841f4ae9f 100644 --- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardReaderConnectionAnalyticsTracker.swift +++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/CardReaderConnectionAnalyticsTracker.swift @@ -102,9 +102,9 @@ final class CardReaderConnectionAnalyticsTracker { cardReaderModel: cardReaderModel)) } - func automaticallyDisconnectedFromBuiltInReader() { + func automaticallyDisconnectedFromTapToPayReader() { analytics.track(event: WooAnalyticsEvent.InPersonPayments - .manageCardReadersBuiltInReaderAutoDisconnect(forGatewayID: gatewayID, + .manageCardReadersTapToPayReaderAutoDisconnect(forGatewayID: gatewayID, countryCode: configuration.countryCode)) } diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderConnectionController.swift b/WooCommerce/Classes/ViewRelated/CardPresentPayments/TapToPayCardReaderConnectionController.swift similarity index 96% rename from WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderConnectionController.swift rename to WooCommerce/Classes/ViewRelated/CardPresentPayments/TapToPayCardReaderConnectionController.swift index d2c7d3dcb7e..0cc89ddf729 100644 --- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderConnectionController.swift +++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/TapToPayCardReaderConnectionController.swift @@ -9,13 +9,13 @@ import Experiments /// Facilitates connecting to a card reader /// -protocol BuiltInCardReaderConnectionControlling { +protocol TapToPayCardReaderConnectionControlling { func searchAndConnect(onCompletion: @escaping (Result) -> Void) } -final class BuiltInCardReaderConnectionController: - BuiltInCardReaderConnectionControlling + TapToPayCardReaderConnectionControlling where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { private enum ControllerState { /// Initial state of the controller @@ -98,7 +98,7 @@ where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { private let siteID: Int64 private let alertsPresenter: AlertPresenter - private let merchantEducationPresenter: BuiltInCardReaderMerchantEducationPresenting? + private let merchantEducationPresenter: TapToPayCardReaderMerchantEducationPresenting? private let configuration: CardPresentPaymentsConfiguration private let alertsProvider: AlertProvider @@ -139,7 +139,7 @@ where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { stores: StoresManager = ServiceLocator.stores, alertsPresenter: AlertPresenter, alertsProvider: AlertProvider, - merchantEducationPresenter: BuiltInCardReaderMerchantEducationPresenting? = nil, + merchantEducationPresenter: TapToPayCardReaderMerchantEducationPresenting? = nil, configuration: CardPresentPaymentsConfiguration, analyticsTracker: CardReaderConnectionAnalyticsTracker, featureFlagService: FeatureFlagService = ServiceLocator.featureFlagService, @@ -177,7 +177,7 @@ where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { } } -private extension BuiltInCardReaderConnectionController { +private extension TapToPayCardReaderConnectionController { func configureResultsControllers() { dataSource.configureResultsControllers(onReload: { [weak self] in guard let self = self else { return } @@ -263,7 +263,7 @@ private extension BuiltInCardReaderConnectionController { let action = CardPresentPaymentAction.startCardReaderDiscovery( siteID: siteID, - discoveryMethod: .localMobile, + discoveryMethod: .tapToPay, onReaderDiscovered: { [weak self] cardReaders in guard let self = self else { return @@ -441,7 +441,7 @@ private extension BuiltInCardReaderConnectionController { if let presenter = merchantEducationPresenter { - let onboardingAction = CardPresentPaymentAction.observeBuiltInCardReaderAcceptToS { [weak self] events in + let onboardingAction = CardPresentPaymentAction.observeTapToPayCardReaderAcceptToS { [weak self] events in guard let self else { return } events @@ -467,7 +467,7 @@ private extension BuiltInCardReaderConnectionController { let options = CardReaderConnectionOptions( - builtInOptions: BuiltInCardReaderConnectionOptions(termsOfServiceAcceptancePermitted: allowTermsOfServiceAcceptance)) + tapToPayOptions: TapToPayCardReaderConnectionOptions(termsOfServiceAcceptancePermitted: allowTermsOfServiceAcceptance)) let action = CardPresentPaymentAction.connect(reader: candidateReader, options: options) { [weak self] result in guard let self = self else { return } @@ -501,7 +501,7 @@ private extension BuiltInCardReaderConnectionController { case .failure(let error): // The TOS acceptance flow happens during connection, not discovery, and cancelations from Apple's // screen are returned as failures here. - if case .connection(.appleBuiltInReaderTOSAcceptanceCanceled) = error as? CardReaderServiceError { + if case .connection(.tapToPayReaderTOSAcceptanceCanceled) = error as? CardReaderServiceError { return self.state = .cancel(.appleTOSAcceptance) } else { self.analyticsTracker.connectionFailed(error: error, @@ -664,10 +664,10 @@ private extension BuiltInCardReaderConnectionController { private extension CardReaderServiceUnderlyingError { var canBeResolvedByRetrying: Bool { switch self { - case .appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn, + case .tapToPayReaderTOSAcceptanceRequiresiCloudSignIn, .passcodeNotEnabled, - .appleBuiltInReaderDeviceBanned, - .appleBuiltInReaderMerchantBlocked, + .tapToPayReaderDeviceBanned, + .tapToPayReaderMerchantBlocked, .nfcDisabled, .unsupportedMobileDeviceConfiguration: return false @@ -679,7 +679,7 @@ private extension CardReaderServiceUnderlyingError { // MARK: - Merchant Education -private extension BuiltInCardReaderConnectionController { +private extension TapToPayCardReaderConnectionController { private var isEducationInProgress: Bool { switch state { case .connecting(let educationInProgress), diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift b/WooCommerce/Classes/ViewRelated/CardPresentPayments/TapToPayCardReaderMerchantEducationPresenter.swift similarity index 79% rename from WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift rename to WooCommerce/Classes/ViewRelated/CardPresentPayments/TapToPayCardReaderMerchantEducationPresenter.swift index 2072c4d9811..8e580a490f8 100644 --- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift +++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/TapToPayCardReaderMerchantEducationPresenter.swift @@ -2,11 +2,11 @@ import Foundation import SwiftUI import UIKit -protocol BuiltInCardReaderMerchantEducationPresenting { +protocol TapToPayCardReaderMerchantEducationPresenting { func presentMerchantEducation(completion: @escaping () -> Void) } -final class BuiltInCardReaderMerchantEducationPresenter: @preconcurrency BuiltInCardReaderMerchantEducationPresenting { +final class TapToPayCardReaderMerchantEducationPresenter: @preconcurrency TapToPayCardReaderMerchantEducationPresenting { private weak var rootViewController: ViewControllerPresenting? init(rootViewController: UIViewController) { diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BluetoothCardReaderSettingsConnectedViewModel.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BluetoothCardReaderSettingsConnectedViewModel.swift index 7496d49f976..0bf0fc2abeb 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BluetoothCardReaderSettingsConnectedViewModel.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BluetoothCardReaderSettingsConnectedViewModel.swift @@ -98,7 +98,7 @@ final class BluetoothCardReaderSettingsConnectedViewModel: PaymentSettingsFlowPr return } - self.disconnectFromBuiltInReader(in: readers) + self.disconnectFromTapToPayReader(in: readers) self.readerUpdateError = nil self.didGetConnectedReaders = true self.connectedReaders = readers @@ -150,10 +150,10 @@ final class BluetoothCardReaderSettingsConnectedViewModel: PaymentSettingsFlowPr /// This screen is only used for managing Bluetooth card readers. /// If we're connected to Tap to Pay on iPhone, we should disconnect, as users are unlikely to consider /// another part of their phone as something they connect to and manage. - private func disconnectFromBuiltInReader(in readers: [CardReader]) { - if readers.includesBuiltInReader() { + private func disconnectFromTapToPayReader(in readers: [CardReader]) { + if readers.includesTapToPayReader() { self.disconnect() - self.analyticsTracker.automaticallyDisconnectedFromBuiltInReader() + self.analyticsTracker.automaticallyDisconnectedFromTapToPayReader() } } @@ -266,7 +266,7 @@ final class BluetoothCardReaderSettingsConnectedViewModel: PaymentSettingsFlowPr newShouldShow = .isUnknown } else if connectedReaders.isEmpty { newShouldShow = .isFalse - } else if connectedReaders.includesBuiltInReader() { + } else if connectedReaders.includesTapToPayReader() { /// This screen only supports management of Bluetooth readers, and will have started disconnection /// from Tap to Pay on iPhone in this instance. newShouldShow = .isFalse @@ -284,8 +284,8 @@ final class BluetoothCardReaderSettingsConnectedViewModel: PaymentSettingsFlowPr } private extension [CardReader] { - func includesBuiltInReader() -> Bool { - return self.first(where: { $0.readerType == .appleBuiltIn }) != nil + func includesTapToPayReader() -> Bool { + return self.first(where: { $0.readerType == .tapToPay }) != nil } } diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/SetUpTapToPayInformationViewController.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/SetUpTapToPayInformationViewController.swift index 7af0c94d7e3..aac82f462f2 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/SetUpTapToPayInformationViewController.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/SetUpTapToPayInformationViewController.swift @@ -14,15 +14,15 @@ final class SetUpTapToPayInformationViewController: UIHostingController.Publisher private let analytics: Analytics = ServiceLocator.analytics - var connectionController: BuiltInCardReaderConnectionController? = nil + var connectionController: TapToPayCardReaderConnectionController? = nil var alertsPresenter: CardPresentPaymentAlertsPresenter? = nil private(set) var noConnectedReader: CardReaderSettingsTriState = .isUnknown { @@ -158,7 +158,7 @@ private extension [CardReader] { func includesBluetoothReader() -> Bool { return self.first(where: { reader in switch reader.readerType { - case .appleBuiltIn: + case .tapToPay: return false default: return true diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayAwarenessMomentDeterminer.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayAwarenessMomentDeterminer.swift index aa4d97ffcd3..2685c7bff56 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayAwarenessMomentDeterminer.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayAwarenessMomentDeterminer.swift @@ -42,8 +42,8 @@ struct TapToPayAwarenessMomentDeterminer: TapToPayAwarenessMomentDetermining { return false } - async let deviceSupportsTapToPay = cardReaderSupportDeterminer.deviceSupportsLocalMobileReader() - async let siteSupportsTapToPay = cardReaderSupportDeterminer.siteSupportsLocalMobileReader() + async let deviceSupportsTapToPay = cardReaderSupportDeterminer.deviceSupportsTapToPayReader() + async let siteSupportsTapToPay = cardReaderSupportDeterminer.siteSupportsTapToPayReader() async let hasPreviousTapToPayUsage = cardReaderSupportDeterminer.hasPreviousTapToPayUsage() let deviceSupportsTapToPayResult = await deviceSupportsTapToPay let siteSupportsTapToPayResult = await siteSupportsTapToPay diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BuiltInCardReaderPaymentAlertsProvider.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/TapToPayCardReaderPaymentAlertsProvider.swift similarity index 79% rename from WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BuiltInCardReaderPaymentAlertsProvider.swift rename to WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/TapToPayCardReaderPaymentAlertsProvider.swift index 5143a6fe1e5..d6b42dbe19f 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BuiltInCardReaderPaymentAlertsProvider.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/TapToPayCardReaderPaymentAlertsProvider.swift @@ -4,18 +4,18 @@ import MessageUI import enum Hardware.CardReaderServiceError import enum Hardware.UnderlyingError -final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsProviding { +final class TapToPayCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsProviding { var name: String = "" var amount: String = "" func validatingOrder(onCancel: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { CardPresentModalPreparingForPayment(bottomTitle: Localization.validatingOrderBottomTitle, - cancelAction: onCancel) + cancelAction: onCancel) } func preparingReader(onCancel: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { CardPresentModalPreparingForPayment(bottomTitle: Localization.preparingReaderBottomTitle, - cancelAction: onCancel) + cancelAction: onCancel) } func tapOrInsertCard(title: String, @@ -24,10 +24,10 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP onCancel: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { name = title self.amount = amount - return CardPresentModalBuiltInFollowReaderInstructions(name: name, - amount: amount, - transactionType: .collectPayment, - inputMethods: inputMethods) + return CardPresentModalTapToPayFollowReaderInstructions(name: name, + amount: amount, + transactionType: .collectPayment, + inputMethods: inputMethods) } func displayReaderMessage(message: String) -> CardPresentPaymentsModalViewModel { @@ -38,21 +38,21 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP func processingTransaction(title: String) -> CardPresentPaymentsModalViewModel { name = title - return CardPresentModalBuiltInReaderProcessing(name: name, amount: amount) + return CardPresentModalTapToPayReaderProcessing(name: name, amount: amount) } func success(receiptState: CardReaderTransactionAlertReceiptState) -> CardPresentPaymentsModalViewModel { switch receiptState { case let .paymentSuccessEmailSent(email, printReceiptAction, noReceiptAction): - return CardPresentModalBuiltInSuccessEmailSent(printReceipt: printReceiptAction, - noReceiptAction: noReceiptAction, - email: email) + return CardPresentModalTapToPaySuccessEmailSent(printReceipt: printReceiptAction, + noReceiptAction: noReceiptAction, + email: email) case let .promptToSendEmailReceipt(printReceiptAction, emailReceiptAction, noReceiptAction): - return CardPresentModalBuiltInSuccess(printReceipt: printReceiptAction, - emailReceipt: emailReceiptAction, - noReceiptAction: noReceiptAction) + return CardPresentModalTapToPaySuccess(printReceipt: printReceiptAction, + emailReceipt: emailReceiptAction, + noReceiptAction: noReceiptAction) case let .emailSendingNotSupported(printReceiptAction, noReceiptAction): - return CardPresentModalBuiltInSuccessWithoutEmail(printReceipt: printReceiptAction, noReceiptAction: noReceiptAction) + return CardPresentModalTapToPaySuccessWithoutEmail(printReceipt: printReceiptAction, noReceiptAction: noReceiptAction) } } @@ -62,25 +62,25 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP dismissCompletion: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { switch receiptState { case let .paymentSuccessEmailSent(email): - return CardPresentModalErrorEmailSent(errorDescription: builtInReaderDescription(for: error), + return CardPresentModalErrorEmailSent(errorDescription: tapToPayReaderDescription(for: error), transactionType: .collectPayment, - image: .builtInReaderError, + image: .tapToPayReaderError, email: email, requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod(error), tryAgainAction: tryAgain, dismissCompletion: dismissCompletion) case let .promptToSendEmailReceipt(emailReceiptAction): - return CardPresentModalError(errorDescription: builtInReaderDescription(for: error), + return CardPresentModalError(errorDescription: tapToPayReaderDescription(for: error), transactionType: .collectPayment, - image: .builtInReaderError, + image: .tapToPayReaderError, requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod(error), tryAgainAction: tryAgain, emailReceiptAction: emailReceiptAction, dismissCompletion: dismissCompletion) case .noEmailReceipt: - return CardPresentModalErrorWithoutEmail(errorDescription: builtInReaderDescription(for: error), + return CardPresentModalErrorWithoutEmail(errorDescription: tapToPayReaderDescription(for: error), transactionType: .collectPayment, - image: .builtInReaderError, + image: .tapToPayReaderError, requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod(error), tryAgainAction: tryAgain, dismissCompletion: dismissCompletion) @@ -93,22 +93,22 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP switch receiptState { case let .paymentSuccessEmailSent(email): CardPresentModalNonRetryableErrorEmailSent(amount: amount, - errorDescription: builtInReaderDescription(for: error), - image: .builtInReaderError, + errorDescription: tapToPayReaderDescription(for: error), + image: .tapToPayReaderError, email: email, requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod(error), onDismiss: dismissCompletion) case let .promptToSendEmailReceipt(emailReceiptAction): CardPresentModalNonRetryableError(amount: amount, - errorDescription: builtInReaderDescription(for: error), - image: .builtInReaderError, + errorDescription: tapToPayReaderDescription(for: error), + image: .tapToPayReaderError, requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod(error), onDismiss: dismissCompletion, emailReceiptAction: emailReceiptAction) case .noEmailReceipt: CardPresentModalNonRetryableErrorWithoutEmail(amount: amount, - errorDescription: builtInReaderDescription(for: error), - image: .builtInReaderError, + errorDescription: tapToPayReaderDescription(for: error), + image: .tapToPayReaderError, requiresFallbackPaymentMethod: errorRequiresFallbackPaymentMethod(error), onDismiss: dismissCompletion) } @@ -119,8 +119,8 @@ final class BuiltInCardReaderPaymentAlertsProvider: CardReaderTransactionAlertsP } } -private extension BuiltInCardReaderPaymentAlertsProvider { - func builtInReaderDescription(for error: Error) -> String? { +private extension TapToPayCardReaderPaymentAlertsProvider { + func tapToPayReaderDescription(for error: Error) -> String? { if let error = error as? CardReaderServiceError { switch error { case .connection(let underlyingError), diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BuiltInReaderConnectionAlertsProvider.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/TapToPayReaderConnectionAlertsProvider.swift similarity index 75% rename from WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BuiltInReaderConnectionAlertsProvider.swift rename to WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/TapToPayReaderConnectionAlertsProvider.swift index 8510984e8a2..19094f6d178 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/BuiltInReaderConnectionAlertsProvider.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/TapToPayReaderConnectionAlertsProvider.swift @@ -1,31 +1,31 @@ import Foundation import UIKit -struct BuiltInReaderConnectionAlertsProvider: CardReaderConnectionAlertsProviding { +struct TapToPayReaderConnectionAlertsProvider: CardReaderConnectionAlertsProviding { func scanningForReader(cancel: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { - CardPresentModalBuiltInReaderCheckingDeviceSupport(cancel: cancel) + CardPresentModalTapToPayReaderCheckingDeviceSupport(cancel: cancel) } func scanningFailed(error: Error, close: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { - CardPresentModalScanningFailed(error: error, image: .builtInReaderError, primaryAction: close) + CardPresentModalScanningFailed(error: error, image: .tapToPayReaderError, primaryAction: close) } func connectingToReader() -> CardPresentPaymentsModalViewModel { - CardPresentModalBuiltInConnectingToReader() + CardPresentModalTapToPayConnectingToReader() } func connectingFailed(error: Error, retrySearch: @escaping () -> Void, cancelSearch: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { - CardPresentModalBuiltInConnectingFailed(error: error, - continueSearch: retrySearch, - cancelSearch: cancelSearch) + CardPresentModalTapToPayConnectingFailed(error: error, + continueSearch: retrySearch, + cancelSearch: cancelSearch) } func connectingFailedNonRetryable(error: Error, close: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { - CardPresentModalBuiltInConnectingFailedNonRetryable(error: error, - close: close) + CardPresentModalTapToPayConnectingFailedNonRetryable(error: error, + close: close) } @@ -34,7 +34,7 @@ struct BuiltInReaderConnectionAlertsProvider: CardReaderConnectionAlertsProvidin openWCSettings: (() -> Void)?, retrySearch: @escaping () -> Void, cancelSearch: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { - CardPresentModalConnectingFailedUpdateAddress(image: .builtInReaderError, + CardPresentModalConnectingFailedUpdateAddress(image: .tapToPayReaderError, wcSettingsAdminURL: wcSettingsAdminURL, openWCSettings: openWCSettings, retrySearch: retrySearch, @@ -43,7 +43,7 @@ struct BuiltInReaderConnectionAlertsProvider: CardReaderConnectionAlertsProvidin func connectingFailedInvalidPostalCode(retrySearch: @escaping () -> Void, cancelSearch: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { - CardPresentModalConnectingFailedUpdatePostalCode(image: .builtInReaderError, + CardPresentModalConnectingFailedUpdatePostalCode(image: .tapToPayReaderError, retrySearch: retrySearch, cancelSearch: cancelSearch) } @@ -51,16 +51,16 @@ struct BuiltInReaderConnectionAlertsProvider: CardReaderConnectionAlertsProvidin func updatingFailed(tryAgain: (() -> Void)?, close: @escaping () -> Void) -> CardPresentPaymentsModalViewModel { if let tryAgain = tryAgain { - return CardPresentModalUpdateFailed(image: .builtInReaderError, tryAgain: tryAgain, close: close) + return CardPresentModalUpdateFailed(image: .tapToPayReaderError, tryAgain: tryAgain, close: close) } else { - return CardPresentModalUpdateFailedNonRetryable(image: .builtInReaderError, close: close) + return CardPresentModalUpdateFailedNonRetryable(image: .tapToPayReaderError, close: close) } } func updateProgress(requiredUpdate: Bool, progress: Float, cancel: (() -> Void)?) -> CardPresentPaymentsModalViewModel { - CardPresentModalBuiltInConfigurationProgress(progress: progress, cancel: cancel) + CardPresentModalTapToPayConfigurationProgress(progress: progress, cancel: cancel) } func selectSearchType(tapToPay: @escaping () -> Void, diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderSupportDeterminer.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderSupportDeterminer.swift index 34724e1f387..e17b98534b7 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderSupportDeterminer.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderSupportDeterminer.swift @@ -5,8 +5,8 @@ import CoreLocation protocol CardReaderSupportDetermining { func connectedReader() async -> CardReader? func hasPreviousTapToPayUsage() async -> Bool - func siteSupportsLocalMobileReader() -> Bool - func deviceSupportsLocalMobileReader() async -> Bool + func siteSupportsTapToPayReader() -> Bool + func deviceSupportsTapToPayReader() async -> Bool func firstTapToPayTransactionDate() async -> Date? var locationIsAuthorized: Bool { get } } @@ -16,7 +16,7 @@ final class CardReaderSupportDeterminer: CardReaderSupportDetermining { private let configuration: CardPresentPaymentsConfiguration private let siteID: Int64 private var locationManager: CLLocationManager = CLLocationManager() - private static var deviceSupportsLocalMobileReader: [Int64: ExpiringBool] = [:] + private static var deviceSupportsTapToPayReader: [Int64: ExpiringBool] = [:] init(siteID: Int64, configuration: CardPresentPaymentsConfiguration = CardPresentConfigurationLoader().configuration, @@ -54,33 +54,33 @@ final class CardReaderSupportDeterminer: CardReaderSupportDetermining { await firstTapToPayTransactionDate() != nil } - func siteSupportsLocalMobileReader() -> Bool { - configuration.supportedReaders.contains(.appleBuiltIn) + func siteSupportsTapToPayReader() -> Bool { + configuration.supportedReaders.contains(.tapToPay) } @MainActor - func deviceSupportsLocalMobileReader() async -> Bool { + func deviceSupportsTapToPayReader() async -> Bool { /// There may be crashes due to multiple consecutive calls checkDeviceSupport /// Limit the calls to once every 30 seconds and cache the result /// - if let cachedResult = Self.deviceSupportsLocalMobileReader[siteID], !cachedResult.isExpired { + if let cachedResult = Self.deviceSupportsTapToPayReader[siteID], !cachedResult.isExpired { return cachedResult.value } - let deviceSupportsLocalMobileReader = await withCheckedContinuation { continuation in + let deviceSupportsTapToPayReader = await withCheckedContinuation { continuation in let action = CardPresentPaymentAction.checkDeviceSupport( siteID: siteID, - cardReaderType: .appleBuiltIn, - discoveryMethod: .localMobile, + cardReaderType: .tapToPay, + discoveryMethod: .tapToPay, minimumOperatingSystemVersionOverride: configuration.minimumOperatingSystemVersionForTapToPay) { result in continuation.resume(returning: result) } stores.dispatch(action) } - Self.deviceSupportsLocalMobileReader[siteID] = ExpiringBool(value: deviceSupportsLocalMobileReader, expirationInSeconds: 30) - return deviceSupportsLocalMobileReader + Self.deviceSupportsTapToPayReader[siteID] = ExpiringBool(value: deviceSupportsTapToPayReader, expirationInSeconds: 30) + return deviceSupportsTapToPayReader } @MainActor @@ -88,7 +88,7 @@ final class CardReaderSupportDeterminer: CardReaderSupportDetermining { await withCheckedContinuation { continuation in let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate( siteID: siteID, - cardReaderType: .appleBuiltIn) { date in + cardReaderType: .tapToPay) { date in continuation.resume(returning: date) } diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderType+Manual.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderType+Manual.swift index 494684a3839..75b96d36f6c 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderType+Manual.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardReaderType+Manual.swift @@ -25,7 +25,7 @@ extension CardReaderType { name: "Wisepad 3", urlString: "https://woocommerce.com/wp-content/uploads/2022/12/wp3_product_sheet.pdf" ) - case .other, .appleBuiltIn: + case .other, .tapToPay: return nil } } diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/Payments Menu/InPersonPaymentsMenuViewModel.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/Payments Menu/InPersonPaymentsMenuViewModel.swift index aeb17eba604..c48cf682172 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/Payments Menu/InPersonPaymentsMenuViewModel.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/Payments Menu/InPersonPaymentsMenuViewModel.swift @@ -380,7 +380,7 @@ private extension InPersonPaymentsMenuViewModel { private extension InPersonPaymentsMenuViewModel { func updateTapToPaySection() async { - let deviceSupportsTapToPay = await dependencies.cardReaderSupportDeterminer.deviceSupportsLocalMobileReader() + let deviceSupportsTapToPay = await dependencies.cardReaderSupportDeterminer.deviceSupportsTapToPayReader() shouldShowTapToPaySection = isEligibleForCardPresentPayments && countryEnabledForTapToPay && @@ -390,7 +390,7 @@ private extension InPersonPaymentsMenuViewModel { } var countryEnabledForTapToPay: Bool { - cardPresentPaymentsConfiguration.supportedReaders.contains(.appleBuiltIn) + cardPresentPaymentsConfiguration.supportedReaders.contains(.tapToPay) } func updateSetUpTryTapToPay() async { diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayBadgePromotionChecker.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayBadgePromotionChecker.swift index db412d830a8..080f7b97f73 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayBadgePromotionChecker.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayBadgePromotionChecker.swift @@ -35,8 +35,8 @@ final class TapToPayBadgePromotionChecker { } let supportDeterminer = CardReaderSupportDeterminer(siteID: siteID) - guard supportDeterminer.siteSupportsLocalMobileReader(), - await supportDeterminer.deviceSupportsLocalMobileReader(), + guard supportDeterminer.siteSupportsTapToPayReader(), + await supportDeterminer.deviceSupportsTapToPayReader(), await !supportDeterminer.hasPreviousTapToPayUsage() else { return shouldShowTapToPayBadges = false } diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionController.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionController.swift index e992a5e5d25..9ac981c9dc4 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionController.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionController.swift @@ -1,19 +1,19 @@ import Foundation import Yosemite -protocol BuiltInCardReaderConnectionControllerBuilding { +protocol TapToPayCardReaderConnectionControllerBuilding { associatedtype AlertProvider associatedtype AlertPresenter func createConnectionController(forSiteID: Int64, alertPresenter: AlertPresenter, configuration: CardPresentPaymentsConfiguration, analyticsTracker: CardReaderConnectionAnalyticsTracker, - allowTermsOfServiceAcceptance: Bool) -> BuiltInCardReaderConnectionControlling + allowTermsOfServiceAcceptance: Bool) -> TapToPayCardReaderConnectionControlling } -final class BuiltInCardReaderConnectionControllerFactory: - BuiltInCardReaderConnectionControllerBuilding + TapToPayCardReaderConnectionControllerBuilding where AlertPresenter.AlertDetails == AlertProvider.AlertDetails { private let alertProvider: AlertProvider @@ -25,8 +25,8 @@ where AlertPresenter.AlertDetails == AlertProvider.AlertDetails { alertPresenter: AlertPresenter, configuration: CardPresentPaymentsConfiguration, analyticsTracker: CardReaderConnectionAnalyticsTracker, - allowTermsOfServiceAcceptance: Bool) -> BuiltInCardReaderConnectionControlling { - BuiltInCardReaderConnectionController( + allowTermsOfServiceAcceptance: Bool) -> TapToPayCardReaderConnectionControlling { + TapToPayCardReaderConnectionController( forSiteID: siteID, alertsPresenter: alertPresenter, alertsProvider: alertProvider, @@ -52,17 +52,17 @@ where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { private let onboardingCache: CardPresentPaymentOnboardingStateCache - private let connectionControllerFactory: any BuiltInCardReaderConnectionControllerBuilding< + private let connectionControllerFactory: any TapToPayCardReaderConnectionControllerBuilding< AlertProvider, SilenceablePassthroughCardPresentPaymentAlertsPresenter> - private var connectionController: BuiltInCardReaderConnectionControlling? = nil + private var connectionController: TapToPayCardReaderConnectionControlling? = nil private var silencingAlertsPresenter: SilenceablePassthroughCardPresentPaymentAlertsPresenter private var adoptedConnectionCompletionHandler: ((Result) -> Void)? = nil init(stores: StoresManager = ServiceLocator.stores, - connectionControllerFactory: any BuiltInCardReaderConnectionControllerBuilding< + connectionControllerFactory: any TapToPayCardReaderConnectionControllerBuilding< AlertProvider, SilenceablePassthroughCardPresentPaymentAlertsPresenter>, onboardingCache: CardPresentPaymentOnboardingStateCache = .shared) { self.stores = stores @@ -86,8 +86,8 @@ where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { let supportDeterminer = supportDeterminer ?? CardReaderSupportDeterminer(siteID: siteID) Task { @MainActor in guard supportDeterminer.locationIsAuthorized, - supportDeterminer.siteSupportsLocalMobileReader(), - await supportDeterminer.deviceSupportsLocalMobileReader(), + supportDeterminer.siteSupportsTapToPayReader(), + await supportDeterminer.deviceSupportsTapToPayReader(), await supportDeterminer.hasPreviousTapToPayUsage(), await supportDeterminer.connectedReader() == nil, case .completed = onboardingCache.value else { @@ -118,7 +118,7 @@ where AlertProvider.AlertDetails == AlertPresenter.AlertDetails { private extension TapToPayReconnectionController { func reconnectToTapToPayReader() { - let connectionController = builtInConnectionControllerForReconnection() + let connectionController = tapToPayConnectionControllerForReconnection() connectionController.searchAndConnect(onCompletion: { [weak self] result in guard let self = self else { return } @@ -127,7 +127,7 @@ private extension TapToPayReconnectionController { }) } - func builtInConnectionControllerForReconnection() -> BuiltInCardReaderConnectionControlling { + func tapToPayConnectionControllerForReconnection() -> TapToPayCardReaderConnectionControlling { // If we already have a connection controller, there may be a reconnection in progress. // Starting again now would result in an SDK failure, and lose our original reference to the controller. // Reusing the connection controller will only cause a restart if the controller is idle, diff --git a/WooCommerce/Classes/ViewRelated/Orders/Collect Payments/CollectOrderPaymentUseCase.swift b/WooCommerce/Classes/ViewRelated/Orders/Collect Payments/CollectOrderPaymentUseCase.swift index 2b77467167c..35be5c25461 100644 --- a/WooCommerce/Classes/ViewRelated/Orders/Collect Payments/CollectOrderPaymentUseCase.swift +++ b/WooCommerce/Classes/ViewRelated/Orders/Collect Payments/CollectOrderPaymentUseCase.swift @@ -31,11 +31,11 @@ protocol CollectOrderPaymentProtocol { /// Use case to collect payments from an order. /// Orchestrates reader connection, payment, UI alerts, receipt handling and analytics. /// -final class CollectOrderPaymentUseCase: NSObject, CollectOrderPaymentProtocol -where BuiltInAlertProvider.AlertDetails == AlertPresenter.AlertDetails, +where TapToPayAlertProvider.AlertDetails == AlertPresenter.AlertDetails, BluetoothAlertProvider.AlertDetails == AlertPresenter.AlertDetails { /// Currency Formatter /// @@ -199,7 +199,7 @@ where BuiltInAlertProvider.AlertDetails == AlertPresenter.AlertDetails, private func paymentAlertProvider(for reader: CardReader) -> any CardReaderTransactionAlertsProviding { switch reader.readerType { - case .appleBuiltIn: + case .tapToPay: return tapToPayAlertsProvider default: return bluetoothAlertsProvider diff --git a/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsView.swift b/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsView.swift index 9eddd1a6d3d..e61a6bff305 100644 --- a/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsView.swift +++ b/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsView.swift @@ -46,7 +46,7 @@ struct PaymentMethodsView: View { MethodRow(icon: .tapToPayOnIPhoneIcon, title: Localization.tapToPay, accessibilityID: Accessibility.tapToPayMethod) { - viewModel.collectPayment(using: .localMobile, on: rootViewController, onSuccess: dismiss, onFailure: dismiss) + viewModel.collectPayment(using: .tapToPay, on: rootViewController, onSuccess: dismiss, onFailure: dismiss) } Divider() diff --git a/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModel.swift b/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModel.swift index adb359f999b..929265f8af5 100644 --- a/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModel.swift +++ b/WooCommerce/Classes/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModel.swift @@ -222,7 +222,7 @@ final class PaymentMethodsViewModel: ObservableObject { return presentNoticeSubject.send(.error(Localization.genericCollectError)) } let alertsPresenter = CardPresentPaymentAlertsPresenter(rootViewController: rootViewController) - let merchantEducationPresenter = BuiltInCardReaderMerchantEducationPresenter(rootViewController: rootViewController) + let merchantEducationPresenter = TapToPayCardReaderMerchantEducationPresenter(rootViewController: rootViewController) let analyticsTracker = CardReaderConnectionAnalyticsTracker( configuration: cardPresentPaymentsConfiguration, siteID: siteID, @@ -236,8 +236,8 @@ final class PaymentMethodsViewModel: ObservableObject { alertsProvider: BluetoothReaderConnectionAlertsProvider(), configuration: cardPresentPaymentsConfiguration, analyticsTracker: analyticsTracker) - let tapToPayAlertsProvider = BuiltInReaderConnectionAlertsProvider() - let tapToPayConnectionController = BuiltInCardReaderConnectionController( + let tapToPayAlertsProvider = TapToPayReaderConnectionAlertsProvider() + let tapToPayConnectionController = TapToPayCardReaderConnectionController( forSiteID: siteID, alertsPresenter: alertsPresenter, alertsProvider: tapToPayAlertsProvider, @@ -245,7 +245,7 @@ final class PaymentMethodsViewModel: ObservableObject { configuration: cardPresentPaymentsConfiguration, analyticsTracker: analyticsTracker) - collectPaymentsUseCase = useCase ?? CollectOrderPaymentUseCase( siteID: self.siteID, @@ -254,7 +254,7 @@ final class PaymentMethodsViewModel: ObservableObject { rootViewController: rootViewController, configuration: cardPresentPaymentsConfiguration, alertsPresenter: alertsPresenter, - tapToPayAlertsProvider: BuiltInCardReaderPaymentAlertsProvider(), + tapToPayAlertsProvider: TapToPayCardReaderPaymentAlertsProvider(), bluetoothAlertsProvider: BluetoothCardReaderPaymentAlertsProvider(transactionType: .collectPayment), preflightController: CardPresentPaymentPreflightController(siteID: siteID, configuration: cardPresentPaymentsConfiguration, @@ -433,8 +433,8 @@ private extension PaymentMethodsViewModel { return } - localMobileReaderSupported { [weak self] tapToPaySupportedByDevice in - let tapToPaySupportedByStore = self?.cardPresentPaymentsConfiguration.supportedReaders.contains(.appleBuiltIn) ?? false + tapToPayReaderSupported { [weak self] tapToPaySupportedByDevice in + let tapToPaySupportedByStore = self?.cardPresentPaymentsConfiguration.supportedReaders.contains(.tapToPay) ?? false self?.orderIsEligibleForCardPresentPayment { [weak self] orderIsEligible in self?.showPayWithCardRow = orderIsEligible self?.showTapToPayRow = orderIsEligible && tapToPaySupportedByDevice && tapToPaySupportedByStore @@ -442,11 +442,11 @@ private extension PaymentMethodsViewModel { } } - private func localMobileReaderSupported(onCompletion: @escaping ((Bool) -> Void)) { + private func tapToPayReaderSupported(onCompletion: @escaping ((Bool) -> Void)) { let action = CardPresentPaymentAction.checkDeviceSupport( siteID: siteID, - cardReaderType: .appleBuiltIn, - discoveryMethod: .localMobile, + cardReaderType: .tapToPay, + discoveryMethod: .tapToPay, minimumOperatingSystemVersionOverride: cardPresentPaymentsConfiguration.minimumOperatingSystemVersionForTapToPay, onCompletion: onCompletion) stores.dispatch(action) @@ -558,7 +558,7 @@ private extension PaymentMethodsViewModel { /// func shouldReturnToOrderDetails(for discoveryMethod: CardReaderDiscoveryMethod, error: Error) -> Bool { switch (discoveryMethod, error) { - case (.localMobile, let error as CardPaymentErrorProtocol) where error.requiresFallbackPaymentMethod: + case (.tapToPay, let error as CardPaymentErrorProtocol) where error.requiresFallbackPaymentMethod: return false default: return true @@ -602,8 +602,8 @@ enum PaymentMethodsError: Error { private extension CardReaderDiscoveryMethod { var analyticsCardReaderType: WooAnalyticsEvent.PaymentsFlow.CardReaderType { switch self { - case .localMobile: - return .builtIn + case .tapToPay: + return .tapToPay case .bluetoothScan: return .external } diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-error.imageset/Contents.json b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-error.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-error.imageset/Contents.json rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-error.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-error.imageset/illustration - error-dark.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-error.imageset/illustration - error-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-error.imageset/illustration - error-dark.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-error.imageset/illustration - error-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-error.imageset/illustration - error-light.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-error.imageset/illustration - error-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-error.imageset/illustration - error-light.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-error.imageset/illustration - error-light.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-payment-success.imageset/Contents.json b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-payment-success.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-payment-success.imageset/Contents.json rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-payment-success.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-payment-success.imageset/illustration - Payment successful-dark.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-payment-success.imageset/illustration - Payment successful-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-payment-success.imageset/illustration - Payment successful-dark.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-payment-success.imageset/illustration - Payment successful-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-payment-success.imageset/illustration - Payment successful-light.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-payment-success.imageset/illustration - Payment successful-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-payment-success.imageset/illustration - Payment successful-light.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-payment-success.imageset/illustration - Payment successful-light.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-preparing.imageset/Contents.json b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-preparing.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-preparing.imageset/Contents.json rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-preparing.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-preparing.imageset/illustration - Preparing for payment-dark.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-preparing.imageset/illustration - Preparing for payment-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-preparing.imageset/illustration - Preparing for payment-dark.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-preparing.imageset/illustration - Preparing for payment-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-preparing.imageset/illustration - Preparing for payment-light.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-preparing.imageset/illustration - Preparing for payment-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-preparing.imageset/illustration - Preparing for payment-light.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-preparing.imageset/illustration - Preparing for payment-light.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-processing.imageset/Contents.json b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-processing.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-processing.imageset/Contents.json rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-processing.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-processing.imageset/illustration - Processing payment-dark.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-processing.imageset/illustration - Processing payment-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-processing.imageset/illustration - Processing payment-dark.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-processing.imageset/illustration - Processing payment-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-processing.imageset/illustration - Processing payment-light.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-processing.imageset/illustration - Processing payment-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-processing.imageset/illustration - Processing payment-light.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-processing.imageset/illustration - Processing payment-light.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-set-up.imageset/Contents.json b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-set-up.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-set-up.imageset/Contents.json rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-set-up.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-set-up.imageset/setup-ttp-dark.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-set-up.imageset/setup-ttp-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-set-up.imageset/setup-ttp-dark.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-set-up.imageset/setup-ttp-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/built-in-reader-set-up.imageset/setup-ttp-light.pdf b/WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-set-up.imageset/setup-ttp-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/built-in-reader-set-up.imageset/setup-ttp-light.pdf rename to WooCommerce/Resources/Images.xcassets/tap-to-pay-reader-set-up.imageset/setup-ttp-light.pdf diff --git a/WooCommerce/WooCommerce.xcodeproj/project.pbxproj b/WooCommerce/WooCommerce.xcodeproj/project.pbxproj index 38088f1a7d0..4321f70b00e 100644 --- a/WooCommerce/WooCommerce.xcodeproj/project.pbxproj +++ b/WooCommerce/WooCommerce.xcodeproj/project.pbxproj @@ -28,7 +28,7 @@ 011DF3442C53A5CF000AFDD9 /* PointOfSaleCardPresentPaymentValidatingOrderMessageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 011DF3432C53A5CF000AFDD9 /* PointOfSaleCardPresentPaymentValidatingOrderMessageViewModel.swift */; }; 011DF3462C53A919000AFDD9 /* PointOfSaleCardPresentPaymentActivityIndicatingMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 011DF3452C53A919000AFDD9 /* PointOfSaleCardPresentPaymentActivityIndicatingMessageView.swift */; }; 0139BB522D91B45800C78FDE /* CouponRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0139BB512D91B45500C78FDE /* CouponRowView.swift */; }; - 013D2FB42CFEFEC600845D75 /* BuiltInCardReaderMerchantEducationPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013D2FB32CFEFEA800845D75 /* BuiltInCardReaderMerchantEducationPresenter.swift */; }; + 013D2FB42CFEFEC600845D75 /* TapToPayCardReaderMerchantEducationPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013D2FB32CFEFEA800845D75 /* TapToPayCardReaderMerchantEducationPresenter.swift */; }; 013D2FB62CFF54BB00845D75 /* TapToPayEducationStepsFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013D2FB52CFF54B600845D75 /* TapToPayEducationStepsFactory.swift */; }; 014BD4B82C64E2BA0011A66E /* PointOfSaleOrderSyncErrorMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 014BD4B72C64E2BA0011A66E /* PointOfSaleOrderSyncErrorMessageView.swift */; }; 0157A9962C4FEA7200866FFD /* PointOfSaleLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0157A9952C4FEA7200866FFD /* PointOfSaleLoadingView.swift */; }; @@ -54,6 +54,7 @@ 019630B42D01DB4800219D80 /* TapToPayAwarenessMomentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019630B32D01DB4000219D80 /* TapToPayAwarenessMomentView.swift */; }; 019630B62D02018C00219D80 /* TapToPayAwarenessMomentDeterminer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019630B52D02018400219D80 /* TapToPayAwarenessMomentDeterminer.swift */; }; 019630B82D0211F400219D80 /* TapToPayAwarenessMomentDeterminerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019630B72D0211F400219D80 /* TapToPayAwarenessMomentDeterminerTests.swift */; }; + 019A86842D89C13800ABBB71 /* TapToPayCardReaderPaymentAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019A86832D89C13800ABBB71 /* TapToPayCardReaderPaymentAlertsProvider.swift */; }; 01AAD8142D92E37A0081D60B /* PointOfSaleOrderSyncCouponsErrorMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01AAD8132D92E37A0081D60B /* PointOfSaleOrderSyncCouponsErrorMessageView.swift */; }; 01ADC1362C9AB4810036F7D2 /* PointOfSaleCardPresentPaymentIntentCreationErrorMessageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01ADC1352C9AB4810036F7D2 /* PointOfSaleCardPresentPaymentIntentCreationErrorMessageViewModel.swift */; }; 01ADC1382C9AB6050036F7D2 /* PointOfSaleCardPresentPaymentIntentCreationErrorMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01ADC1372C9AB6050036F7D2 /* PointOfSaleCardPresentPaymentIntentCreationErrorMessageView.swift */; }; @@ -67,7 +68,7 @@ 01BD774C2C58D2BE00147191 /* PointOfSaleCardPresentPaymentDisconnectedMessageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01BD774B2C58D2BE00147191 /* PointOfSaleCardPresentPaymentDisconnectedMessageViewModel.swift */; }; 01D082402C5B9EAB007FE81F /* POSBackgroundAppearanceKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D0823F2C5B9EAB007FE81F /* POSBackgroundAppearanceKey.swift */; }; 01F067ED2D0C5D59001C5805 /* MockLocationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F067EC2D0C5D56001C5805 /* MockLocationService.swift */; }; - 01F42C162CE34AB8003D0A5A /* CardPresentModalBuiltInSuccessEmailSent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F42C152CE34AB3003D0A5A /* CardPresentModalBuiltInSuccessEmailSent.swift */; }; + 01F42C162CE34AB8003D0A5A /* CardPresentModalTapToPaySuccessEmailSent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F42C152CE34AB3003D0A5A /* CardPresentModalTapToPaySuccessEmailSent.swift */; }; 01F42C182CE34AD2003D0A5A /* CardPresentModalSuccessEmailSent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F42C172CE34AD1003D0A5A /* CardPresentModalSuccessEmailSent.swift */; }; 01F579952C7DE709008BCA28 /* PointOfSaleCardPresentPaymentCaptureErrorMessageViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F579942C7DE709008BCA28 /* PointOfSaleCardPresentPaymentCaptureErrorMessageViewModelTests.swift */; }; 01FB19582C6E901800A44FF0 /* DynamicHStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01FB19572C6E901800A44FF0 /* DynamicHStack.swift */; }; @@ -658,7 +659,7 @@ 03191AE628E1DF0600670723 /* PluginDetailsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03191AE528E1DF0600670723 /* PluginDetailsViewModel.swift */; }; 03191AE928E20C9200670723 /* PluginDetailsRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03191AE828E20C9200670723 /* PluginDetailsRowView.swift */; }; 031B10E3274FE2AE007390BA /* CardPresentModalConnectionFailedUpdateAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031B10E2274FE2AE007390BA /* CardPresentModalConnectionFailedUpdateAddress.swift */; }; - 032E481D2982996E00469D92 /* CardPresentModalBuiltInConnectingFailedNonRetryable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 032E481C2982996E00469D92 /* CardPresentModalBuiltInConnectingFailedNonRetryable.swift */; }; + 032E481D2982996E00469D92 /* CardPresentModalTapToPayConnectingFailedNonRetryable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 032E481C2982996E00469D92 /* CardPresentModalTapToPayConnectingFailedNonRetryable.swift */; }; 0331A7002A334982001D2C2C /* MockInAppPurchasesForWPComPlansManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02863F6E2925FC29006A06AA /* MockInAppPurchasesForWPComPlansManager.swift */; }; 03582BE2299A9CC8007B7AA3 /* CollectOrderPaymentAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03582BE1299A9CC8007B7AA3 /* CollectOrderPaymentAnalytics.swift */; }; 035BA3A8291000E90056F0AD /* JustInTimeMessageViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035BA3A7291000E90056F0AD /* JustInTimeMessageViewModelTests.swift */; }; @@ -698,7 +699,7 @@ 038BC38129C4B8AC00EAF565 /* SetUpTapToPayTryPaymentPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038BC38029C4B8AC00EAF565 /* SetUpTapToPayTryPaymentPromptViewModel.swift */; }; 038BC38329C4B8ED00EAF565 /* SetUpTapToPayTryPaymentPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038BC38229C4B8ED00EAF565 /* SetUpTapToPayTryPaymentPromptViewController.swift */; }; 039298C82A45EE3900F393D5 /* MyStoreRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 039298C72A45EE3900F393D5 /* MyStoreRoute.swift */; }; - 0396CFAD2981476900E91436 /* CardPresentModalBuiltInConnectingFailed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0396CFAC2981476800E91436 /* CardPresentModalBuiltInConnectingFailed.swift */; }; + 0396CFAD2981476900E91436 /* CardPresentModalTapToPayConnectingFailed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0396CFAC2981476800E91436 /* CardPresentModalTapToPayConnectingFailed.swift */; }; 039B7E6329F136F200E21EF4 /* SetUpTapToPayOnboardingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 039B7E6229F136F200E21EF4 /* SetUpTapToPayOnboardingViewController.swift */; }; 039B7E6529F167DB00E21EF4 /* UniversalLinkRouter+JustInTimeMessages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 039B7E6429F167DB00E21EF4 /* UniversalLinkRouter+JustInTimeMessages.swift */; }; 039B7E6729F2855B00E21EF4 /* CardPresentPaymentOnboardingViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 039B7E6629F2855B00E21EF4 /* CardPresentPaymentOnboardingViewModelTests.swift */; }; @@ -714,7 +715,7 @@ 03B9E5272A14EA89005C77F5 /* CardReaderSupportDeterminer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B9E5262A14EA89005C77F5 /* CardReaderSupportDeterminer.swift */; }; 03B9E5292A14F136005C77F5 /* SilenceablePassthroughCardPresentPaymentAlertsPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B9E5282A14F136005C77F5 /* SilenceablePassthroughCardPresentPaymentAlertsPresenter.swift */; }; 03B9E52B2A1505A7005C77F5 /* TapToPayReconnectionControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B9E52A2A1505A7005C77F5 /* TapToPayReconnectionControllerTests.swift */; }; - 03B9E52D2A150D16005C77F5 /* MockBuiltInCardReaderConnectionControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B9E52C2A150D16005C77F5 /* MockBuiltInCardReaderConnectionControllerFactory.swift */; }; + 03B9E52D2A150D16005C77F5 /* MockTapToPayCardReaderConnectionControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B9E52C2A150D16005C77F5 /* MockTapToPayCardReaderConnectionControllerFactory.swift */; }; 03B9E52F2A150EED005C77F5 /* MockCardReaderSupportDeterminer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B9E52E2A150EED005C77F5 /* MockCardReaderSupportDeterminer.swift */; }; 03BB9EA5292E2D0C00251E9E /* CardReaderConnectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03BB9EA4292E2D0C00251E9E /* CardReaderConnectionController.swift */; }; 03BB9EA7292E50B600251E9E /* CardPresentModalSelectSearchType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03BB9EA6292E50B600251E9E /* CardPresentModalSelectSearchType.swift */; }; @@ -722,22 +723,21 @@ 03D7985C2A94EC7700809B0E /* MockCollectOrderPaymentAnalyticsTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D7985B2A94EC7700809B0E /* MockCollectOrderPaymentAnalyticsTracker.swift */; }; 03D7985E2A950A7B00809B0E /* MockCardPresentPaymentAlertsPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D7985D2A950A7B00809B0E /* MockCardPresentPaymentAlertsPresenter.swift */; }; 03D798602A960FDF00809B0E /* MockPaymentCaptureOrchestrator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D7985F2A960FDF00809B0E /* MockPaymentCaptureOrchestrator.swift */; }; - 03E471BE29388787001A58AD /* BuiltInCardReaderConnectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471BD29388787001A58AD /* BuiltInCardReaderConnectionController.swift */; }; + 03E471BE29388787001A58AD /* TapToPayCardReaderConnectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471BD29388787001A58AD /* TapToPayCardReaderConnectionController.swift */; }; 03E471C0293A158D001A58AD /* CardReaderConnectionAlertsProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471BF293A158C001A58AD /* CardReaderConnectionAlertsProviding.swift */; }; 03E471C2293A1F6B001A58AD /* BluetoothReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C1293A1F6B001A58AD /* BluetoothReaderConnectionAlertsProvider.swift */; }; - 03E471C4293A1F8D001A58AD /* BuiltInReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C3293A1F8D001A58AD /* BuiltInReaderConnectionAlertsProvider.swift */; }; - 03E471C6293A2E95001A58AD /* CardPresentModalBuiltInReaderCheckingDeviceSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C5293A2E95001A58AD /* CardPresentModalBuiltInReaderCheckingDeviceSupport.swift */; }; - 03E471C8293A3076001A58AD /* CardPresentModalBuiltInConnectingToReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C7293A3075001A58AD /* CardPresentModalBuiltInConnectingToReader.swift */; }; - 03E471CA293E0A30001A58AD /* CardPresentModalBuiltInConfigurationProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C9293E0A2F001A58AD /* CardPresentModalBuiltInConfigurationProgress.swift */; }; + 03E471C4293A1F8D001A58AD /* TapToPayReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C3293A1F8D001A58AD /* TapToPayReaderConnectionAlertsProvider.swift */; }; + 03E471C6293A2E95001A58AD /* CardPresentModalTapToPayReaderCheckingDeviceSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C5293A2E95001A58AD /* CardPresentModalTapToPayReaderCheckingDeviceSupport.swift */; }; + 03E471C8293A3076001A58AD /* CardPresentModalTapToPayConnectingToReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C7293A3075001A58AD /* CardPresentModalTapToPayConnectingToReader.swift */; }; + 03E471CA293E0A30001A58AD /* CardPresentModalTapToPayConfigurationProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471C9293E0A2F001A58AD /* CardPresentModalTapToPayConfigurationProgress.swift */; }; 03E471CC293E0FB8001A58AD /* CardPresentModalProgressDisplaying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471CB293E0FB8001A58AD /* CardPresentModalProgressDisplaying.swift */; }; 03E471CE293F63B4001A58AD /* PaymentCaptureOrchestrator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471CD293F63B4001A58AD /* PaymentCaptureOrchestrator.swift */; }; 03E471D0293FA62B001A58AD /* CardReaderTransactionAlertsProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471CF293FA62B001A58AD /* CardReaderTransactionAlertsProviding.swift */; }; 03E471D2293FA8B2001A58AD /* BluetoothCardReaderPaymentAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D1293FA8B2001A58AD /* BluetoothCardReaderPaymentAlertsProvider.swift */; }; - 03E471D42942096B001A58AD /* BuiltInCardReaderPaymentAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D32942096B001A58AD /* BuiltInCardReaderPaymentAlertsProvider.swift */; }; - 03E471D62942222E001A58AD /* CardPresentModalBuiltInFollowReaderInstructions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D52942222D001A58AD /* CardPresentModalBuiltInFollowReaderInstructions.swift */; }; - 03E471D829424CF9001A58AD /* CardPresentModalBuiltInReaderProcessing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D729424CF8001A58AD /* CardPresentModalBuiltInReaderProcessing.swift */; }; - 03E471DA29424E82001A58AD /* CardPresentModalBuiltInSuccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D929424E81001A58AD /* CardPresentModalBuiltInSuccess.swift */; }; - 03E471DC29424EC9001A58AD /* CardPresentModalBuiltInSuccessWithoutEmail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471DB29424EC9001A58AD /* CardPresentModalBuiltInSuccessWithoutEmail.swift */; }; + 03E471D62942222E001A58AD /* CardPresentModalTapToPayFollowReaderInstructions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D52942222D001A58AD /* CardPresentModalTapToPayFollowReaderInstructions.swift */; }; + 03E471D829424CF9001A58AD /* CardPresentModalTapToPayReaderProcessing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D729424CF8001A58AD /* CardPresentModalTapToPayReaderProcessing.swift */; }; + 03E471DA29424E82001A58AD /* CardPresentModalTapToPaySuccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471D929424E81001A58AD /* CardPresentModalTapToPaySuccess.swift */; }; + 03E471DC29424EC9001A58AD /* CardPresentModalTapToPaySuccessWithoutEmail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E471DB29424EC9001A58AD /* CardPresentModalTapToPaySuccessWithoutEmail.swift */; }; 03EF24FA28BF5D21006A033E /* InPersonPaymentsCashOnDeliveryToggleRowViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EF24F928BF5D21006A033E /* InPersonPaymentsCashOnDeliveryToggleRowViewModel.swift */; }; 03EF24FC28BF996F006A033E /* InPersonPaymentsCashOnDeliveryPaymentGatewayHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EF24FB28BF996F006A033E /* InPersonPaymentsCashOnDeliveryPaymentGatewayHelpers.swift */; }; 03EF24FE28C0B356006A033E /* CardPresentPaymentsPlugin+CashOnDelivery.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EF24FD28C0B356006A033E /* CardPresentPaymentsPlugin+CashOnDelivery.swift */; }; @@ -849,7 +849,7 @@ 205E794F2C207D38001BA266 /* PointOfSaleCardPresentPaymentNonRetryableErrorMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 205E794E2C207D38001BA266 /* PointOfSaleCardPresentPaymentNonRetryableErrorMessageView.swift */; }; 205E79512C207FAE001BA266 /* PointOfSaleCardPresentPaymentDisplayReaderMessageMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 205E79502C207FAE001BA266 /* PointOfSaleCardPresentPaymentDisplayReaderMessageMessageView.swift */; }; 20600F8B2C6E3CCE00950D2A /* PointOfSaleCardPresentPaymentEventPresentationStyleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20600F8A2C6E3CCE00950D2A /* PointOfSaleCardPresentPaymentEventPresentationStyleTests.swift */; }; - 20762BA12C18A66400758305 /* CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20762BA02C18A66400758305 /* CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift */; }; + 20762BA12C18A66400758305 /* CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20762BA02C18A66400758305 /* CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift */; }; 20762BA32C18A6A300758305 /* CardPresentPaymentEventDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20762BA22C18A6A300758305 /* CardPresentPaymentEventDetails.swift */; }; 20762BA52C18B42C00758305 /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20762BA42C18B42C00758305 /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift */; }; 20762BA72C18B55100758305 /* CardPresentPaymentsTransactionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20762BA62C18B55100758305 /* CardPresentPaymentsTransactionAlertsProvider.swift */; }; @@ -3265,7 +3265,7 @@ 011DF3432C53A5CF000AFDD9 /* PointOfSaleCardPresentPaymentValidatingOrderMessageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentValidatingOrderMessageViewModel.swift; sourceTree = ""; }; 011DF3452C53A919000AFDD9 /* PointOfSaleCardPresentPaymentActivityIndicatingMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentActivityIndicatingMessageView.swift; sourceTree = ""; }; 0139BB512D91B45500C78FDE /* CouponRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponRowView.swift; sourceTree = ""; }; - 013D2FB32CFEFEA800845D75 /* BuiltInCardReaderMerchantEducationPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuiltInCardReaderMerchantEducationPresenter.swift; sourceTree = ""; }; + 013D2FB32CFEFEA800845D75 /* TapToPayCardReaderMerchantEducationPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayCardReaderMerchantEducationPresenter.swift; sourceTree = ""; }; 013D2FB52CFF54B600845D75 /* TapToPayEducationStepsFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayEducationStepsFactory.swift; sourceTree = ""; }; 014BD4B72C64E2BA0011A66E /* PointOfSaleOrderSyncErrorMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleOrderSyncErrorMessageView.swift; sourceTree = ""; }; 0157A9952C4FEA7200866FFD /* PointOfSaleLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleLoadingView.swift; sourceTree = ""; }; @@ -3291,6 +3291,7 @@ 019630B32D01DB4000219D80 /* TapToPayAwarenessMomentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayAwarenessMomentView.swift; sourceTree = ""; }; 019630B52D02018400219D80 /* TapToPayAwarenessMomentDeterminer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayAwarenessMomentDeterminer.swift; sourceTree = ""; }; 019630B72D0211F400219D80 /* TapToPayAwarenessMomentDeterminerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayAwarenessMomentDeterminerTests.swift; sourceTree = ""; }; + 019A86832D89C13800ABBB71 /* TapToPayCardReaderPaymentAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayCardReaderPaymentAlertsProvider.swift; sourceTree = ""; }; 01AAD8132D92E37A0081D60B /* PointOfSaleOrderSyncCouponsErrorMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleOrderSyncCouponsErrorMessageView.swift; sourceTree = ""; }; 01ADC1352C9AB4810036F7D2 /* PointOfSaleCardPresentPaymentIntentCreationErrorMessageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentIntentCreationErrorMessageViewModel.swift; sourceTree = ""; }; 01ADC1372C9AB6050036F7D2 /* PointOfSaleCardPresentPaymentIntentCreationErrorMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentIntentCreationErrorMessageView.swift; sourceTree = ""; }; @@ -3304,7 +3305,7 @@ 01BD774B2C58D2BE00147191 /* PointOfSaleCardPresentPaymentDisconnectedMessageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentDisconnectedMessageViewModel.swift; sourceTree = ""; }; 01D0823F2C5B9EAB007FE81F /* POSBackgroundAppearanceKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = POSBackgroundAppearanceKey.swift; sourceTree = ""; }; 01F067EC2D0C5D56001C5805 /* MockLocationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockLocationService.swift; sourceTree = ""; }; - 01F42C152CE34AB3003D0A5A /* CardPresentModalBuiltInSuccessEmailSent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInSuccessEmailSent.swift; sourceTree = ""; }; + 01F42C152CE34AB3003D0A5A /* CardPresentModalTapToPaySuccessEmailSent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPaySuccessEmailSent.swift; sourceTree = ""; }; 01F42C172CE34AD1003D0A5A /* CardPresentModalSuccessEmailSent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentModalSuccessEmailSent.swift; sourceTree = ""; }; 01F579942C7DE709008BCA28 /* PointOfSaleCardPresentPaymentCaptureErrorMessageViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentCaptureErrorMessageViewModelTests.swift; sourceTree = ""; }; 01FB19572C6E901800A44FF0 /* DynamicHStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicHStack.swift; sourceTree = ""; }; @@ -3899,7 +3900,7 @@ 03191AE528E1DF0600670723 /* PluginDetailsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginDetailsViewModel.swift; sourceTree = ""; }; 03191AE828E20C9200670723 /* PluginDetailsRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginDetailsRowView.swift; sourceTree = ""; }; 031B10E2274FE2AE007390BA /* CardPresentModalConnectionFailedUpdateAddress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentModalConnectionFailedUpdateAddress.swift; sourceTree = ""; }; - 032E481C2982996E00469D92 /* CardPresentModalBuiltInConnectingFailedNonRetryable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInConnectingFailedNonRetryable.swift; sourceTree = ""; }; + 032E481C2982996E00469D92 /* CardPresentModalTapToPayConnectingFailedNonRetryable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayConnectingFailedNonRetryable.swift; sourceTree = ""; }; 03582BE1299A9CC8007B7AA3 /* CollectOrderPaymentAnalytics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectOrderPaymentAnalytics.swift; sourceTree = ""; }; 035BA3A7291000E90056F0AD /* JustInTimeMessageViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JustInTimeMessageViewModelTests.swift; sourceTree = ""; }; 035C6DEA273EA12D00F70406 /* SoftwareUpdateTypeProperty.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftwareUpdateTypeProperty.swift; sourceTree = ""; }; @@ -3938,7 +3939,7 @@ 038BC38029C4B8AC00EAF565 /* SetUpTapToPayTryPaymentPromptViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetUpTapToPayTryPaymentPromptViewModel.swift; sourceTree = ""; }; 038BC38229C4B8ED00EAF565 /* SetUpTapToPayTryPaymentPromptViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetUpTapToPayTryPaymentPromptViewController.swift; sourceTree = ""; }; 039298C72A45EE3900F393D5 /* MyStoreRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyStoreRoute.swift; sourceTree = ""; }; - 0396CFAC2981476800E91436 /* CardPresentModalBuiltInConnectingFailed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInConnectingFailed.swift; sourceTree = ""; }; + 0396CFAC2981476800E91436 /* CardPresentModalTapToPayConnectingFailed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayConnectingFailed.swift; sourceTree = ""; }; 039B7E6229F136F200E21EF4 /* SetUpTapToPayOnboardingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetUpTapToPayOnboardingViewController.swift; sourceTree = ""; }; 039B7E6429F167DB00E21EF4 /* UniversalLinkRouter+JustInTimeMessages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UniversalLinkRouter+JustInTimeMessages.swift"; sourceTree = ""; }; 039B7E6629F2855B00E21EF4 /* CardPresentPaymentOnboardingViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentOnboardingViewModelTests.swift; sourceTree = ""; }; @@ -3955,7 +3956,7 @@ 03B9E5262A14EA89005C77F5 /* CardReaderSupportDeterminer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardReaderSupportDeterminer.swift; sourceTree = ""; }; 03B9E5282A14F136005C77F5 /* SilenceablePassthroughCardPresentPaymentAlertsPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SilenceablePassthroughCardPresentPaymentAlertsPresenter.swift; sourceTree = ""; }; 03B9E52A2A1505A7005C77F5 /* TapToPayReconnectionControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayReconnectionControllerTests.swift; sourceTree = ""; }; - 03B9E52C2A150D16005C77F5 /* MockBuiltInCardReaderConnectionControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockBuiltInCardReaderConnectionControllerFactory.swift; sourceTree = ""; }; + 03B9E52C2A150D16005C77F5 /* MockTapToPayCardReaderConnectionControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockTapToPayCardReaderConnectionControllerFactory.swift; sourceTree = ""; }; 03B9E52E2A150EED005C77F5 /* MockCardReaderSupportDeterminer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCardReaderSupportDeterminer.swift; sourceTree = ""; }; 03BB9EA4292E2D0C00251E9E /* CardReaderConnectionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardReaderConnectionController.swift; sourceTree = ""; }; 03BB9EA6292E50B600251E9E /* CardPresentModalSelectSearchType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalSelectSearchType.swift; sourceTree = ""; }; @@ -3963,22 +3964,21 @@ 03D7985B2A94EC7700809B0E /* MockCollectOrderPaymentAnalyticsTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCollectOrderPaymentAnalyticsTracker.swift; sourceTree = ""; }; 03D7985D2A950A7B00809B0E /* MockCardPresentPaymentAlertsPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCardPresentPaymentAlertsPresenter.swift; sourceTree = ""; }; 03D7985F2A960FDF00809B0E /* MockPaymentCaptureOrchestrator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPaymentCaptureOrchestrator.swift; sourceTree = ""; }; - 03E471BD29388787001A58AD /* BuiltInCardReaderConnectionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuiltInCardReaderConnectionController.swift; sourceTree = ""; }; + 03E471BD29388787001A58AD /* TapToPayCardReaderConnectionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TapToPayCardReaderConnectionController.swift; sourceTree = ""; }; 03E471BF293A158C001A58AD /* CardReaderConnectionAlertsProviding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardReaderConnectionAlertsProviding.swift; sourceTree = ""; }; 03E471C1293A1F6B001A58AD /* BluetoothReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothReaderConnectionAlertsProvider.swift; sourceTree = ""; }; - 03E471C3293A1F8D001A58AD /* BuiltInReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuiltInReaderConnectionAlertsProvider.swift; sourceTree = ""; }; - 03E471C5293A2E95001A58AD /* CardPresentModalBuiltInReaderCheckingDeviceSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInReaderCheckingDeviceSupport.swift; sourceTree = ""; }; - 03E471C7293A3075001A58AD /* CardPresentModalBuiltInConnectingToReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInConnectingToReader.swift; sourceTree = ""; }; - 03E471C9293E0A2F001A58AD /* CardPresentModalBuiltInConfigurationProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInConfigurationProgress.swift; sourceTree = ""; }; + 03E471C3293A1F8D001A58AD /* TapToPayReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TapToPayReaderConnectionAlertsProvider.swift; sourceTree = ""; }; + 03E471C5293A2E95001A58AD /* CardPresentModalTapToPayReaderCheckingDeviceSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayReaderCheckingDeviceSupport.swift; sourceTree = ""; }; + 03E471C7293A3075001A58AD /* CardPresentModalTapToPayConnectingToReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayConnectingToReader.swift; sourceTree = ""; }; + 03E471C9293E0A2F001A58AD /* CardPresentModalTapToPayConfigurationProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayConfigurationProgress.swift; sourceTree = ""; }; 03E471CB293E0FB8001A58AD /* CardPresentModalProgressDisplaying.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentModalProgressDisplaying.swift; sourceTree = ""; }; 03E471CD293F63B4001A58AD /* PaymentCaptureOrchestrator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaymentCaptureOrchestrator.swift; sourceTree = ""; }; 03E471CF293FA62B001A58AD /* CardReaderTransactionAlertsProviding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardReaderTransactionAlertsProviding.swift; sourceTree = ""; }; 03E471D1293FA8B2001A58AD /* BluetoothCardReaderPaymentAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothCardReaderPaymentAlertsProvider.swift; sourceTree = ""; }; - 03E471D32942096B001A58AD /* BuiltInCardReaderPaymentAlertsProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuiltInCardReaderPaymentAlertsProvider.swift; sourceTree = ""; }; - 03E471D52942222D001A58AD /* CardPresentModalBuiltInFollowReaderInstructions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInFollowReaderInstructions.swift; sourceTree = ""; }; - 03E471D729424CF8001A58AD /* CardPresentModalBuiltInReaderProcessing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInReaderProcessing.swift; sourceTree = ""; }; - 03E471D929424E81001A58AD /* CardPresentModalBuiltInSuccess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInSuccess.swift; sourceTree = ""; }; - 03E471DB29424EC9001A58AD /* CardPresentModalBuiltInSuccessWithoutEmail.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalBuiltInSuccessWithoutEmail.swift; sourceTree = ""; }; + 03E471D52942222D001A58AD /* CardPresentModalTapToPayFollowReaderInstructions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayFollowReaderInstructions.swift; sourceTree = ""; }; + 03E471D729424CF8001A58AD /* CardPresentModalTapToPayReaderProcessing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPayReaderProcessing.swift; sourceTree = ""; }; + 03E471D929424E81001A58AD /* CardPresentModalTapToPaySuccess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPaySuccess.swift; sourceTree = ""; }; + 03E471DB29424EC9001A58AD /* CardPresentModalTapToPaySuccessWithoutEmail.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardPresentModalTapToPaySuccessWithoutEmail.swift; sourceTree = ""; }; 03EF24F928BF5D21006A033E /* InPersonPaymentsCashOnDeliveryToggleRowViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPersonPaymentsCashOnDeliveryToggleRowViewModel.swift; sourceTree = ""; }; 03EF24FB28BF996F006A033E /* InPersonPaymentsCashOnDeliveryPaymentGatewayHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPersonPaymentsCashOnDeliveryPaymentGatewayHelpers.swift; sourceTree = ""; }; 03EF24FD28C0B356006A033E /* CardPresentPaymentsPlugin+CashOnDelivery.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CardPresentPaymentsPlugin+CashOnDelivery.swift"; sourceTree = ""; }; @@ -4090,7 +4090,7 @@ 205E794E2C207D38001BA266 /* PointOfSaleCardPresentPaymentNonRetryableErrorMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentNonRetryableErrorMessageView.swift; sourceTree = ""; }; 205E79502C207FAE001BA266 /* PointOfSaleCardPresentPaymentDisplayReaderMessageMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentDisplayReaderMessageMessageView.swift; sourceTree = ""; }; 20600F8A2C6E3CCE00950D2A /* PointOfSaleCardPresentPaymentEventPresentationStyleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointOfSaleCardPresentPaymentEventPresentationStyleTests.swift; sourceTree = ""; }; - 20762BA02C18A66400758305 /* CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift; sourceTree = ""; }; + 20762BA02C18A66400758305 /* CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift; sourceTree = ""; }; 20762BA22C18A6A300758305 /* CardPresentPaymentEventDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentEventDetails.swift; sourceTree = ""; }; 20762BA42C18B42C00758305 /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift; sourceTree = ""; }; 20762BA62C18B55100758305 /* CardPresentPaymentsTransactionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentsTransactionAlertsProvider.swift; sourceTree = ""; }; @@ -8188,7 +8188,7 @@ 2004E2D52C08E1FA00D62521 /* CardPresentPaymentOnboardingAdaptor.swift */, 2004E2D72C08E56300D62521 /* CardPresentPaymentOnboardingPresentationEvent.swift */, 027179E12C08817F0049F0BD /* CardPresentPaymentService.swift */, - 20762BA02C18A66400758305 /* CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift */, + 20762BA02C18A66400758305 /* CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift */, 20762BA42C18B42C00758305 /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift */, 20762BA62C18B55100758305 /* CardPresentPaymentsTransactionAlertsProvider.swift */, 20ADE9422C6B34D100C91265 /* CardPresentPaymentsRetryApproach.swift */, @@ -8985,8 +8985,7 @@ 0182C8BF2CE4DDC100474355 /* CardReaderTransactionAlertReceiptState.swift */, 03E471D1293FA8B2001A58AD /* BluetoothCardReaderPaymentAlertsProvider.swift */, 03E471C1293A1F6B001A58AD /* BluetoothReaderConnectionAlertsProvider.swift */, - 03E471C3293A1F8D001A58AD /* BuiltInReaderConnectionAlertsProvider.swift */, - 03E471D32942096B001A58AD /* BuiltInCardReaderPaymentAlertsProvider.swift */, + 03E471C3293A1F8D001A58AD /* TapToPayReaderConnectionAlertsProvider.swift */, 3178C1F626409216000D771A /* BluetoothCardReaderSettingsConnectedViewModel.swift */, 035C6DEA273EA12D00F70406 /* SoftwareUpdateTypeProperty.swift */, 314265B02645A07800500598 /* CardReaderSettingsConnectedViewController.swift */, @@ -8994,6 +8993,7 @@ 318853352639FC9C00F66A9C /* PaymentSettingsFlowPresentingViewController.swift */, 20A3AFE22B10EF860033AF2D /* CardReaderSettingsFlowPresentingView.swift */, 20A3AFE42B10EF970033AF2D /* TapToPaySettingsFlowPresentingView.swift */, + 019A86832D89C13800ABBB71 /* TapToPayCardReaderPaymentAlertsProvider.swift */, 31EF399B26430C6D0093C6F6 /* PaymentSettingsFlowPrioritizedViewModelsProvider.swift */, 31B19B66263B5E580099DAA6 /* CardReaderSettingsSearchingViewModel.swift */, 0365986829AFB0C100F297D3 /* SetUpTapToPayInformationViewModel.swift */, @@ -10005,7 +10005,7 @@ A650BE852578E76600C655E0 /* MockStorageManager.swift */, A650BE842578E76600C655E0 /* MockStorageManager+Sample.swift */, B56C721321B5BBC000E5E85B /* MockStoresManager.swift */, - 03B9E52C2A150D16005C77F5 /* MockBuiltInCardReaderConnectionControllerFactory.swift */, + 03B9E52C2A150D16005C77F5 /* MockTapToPayCardReaderConnectionControllerFactory.swift */, 03B9E52E2A150EED005C77F5 /* MockCardReaderSupportDeterminer.swift */, B53A569A21123E8E000776C9 /* MockTableView.swift */, B555531221B57E8800449E71 /* MockUserNotificationsCenterAdapter.swift */, @@ -12958,9 +12958,9 @@ D8815ADD26383EE600EDAD62 /* CardPresentPaymentsModalViewController.swift */, 037D270C28CA444F00A3F924 /* CardReaderModalFlowViewControllerProtocol.swift */, D8815ADE26383EE700EDAD62 /* CardPresentPaymentsModalViewController.xib */, - 03E471BD29388787001A58AD /* BuiltInCardReaderConnectionController.swift */, + 03E471BD29388787001A58AD /* TapToPayCardReaderConnectionController.swift */, 03BB9EA4292E2D0C00251E9E /* CardReaderConnectionController.swift */, - 013D2FB32CFEFEA800845D75 /* BuiltInCardReaderMerchantEducationPresenter.swift */, + 013D2FB32CFEFEA800845D75 /* TapToPayCardReaderMerchantEducationPresenter.swift */, 035DBA46292D0994003E5125 /* CardPresentPaymentPreflightController.swift */, D8EE9690264D328A0033B2F9 /* LegacyReceiptViewController.swift */, D8EE9691264D328A0033B2F9 /* LegacyReceiptViewController.xib */, @@ -12979,22 +12979,22 @@ 011D396E2D09FCCB00DB1445 /* CardPresentModalLocationRequired.swift */, 01BB6C062D09DC470094D55B /* CardPresentModalLocationPreAlert.swift */, D8815AE626383FD600EDAD62 /* CardPresentPaymentsModalViewModel.swift */, - 0396CFAC2981476800E91436 /* CardPresentModalBuiltInConnectingFailed.swift */, - 032E481C2982996E00469D92 /* CardPresentModalBuiltInConnectingFailedNonRetryable.swift */, + 0396CFAC2981476800E91436 /* CardPresentModalTapToPayConnectingFailed.swift */, + 032E481C2982996E00469D92 /* CardPresentModalTapToPayConnectingFailedNonRetryable.swift */, 0300200F29C0EBA400B09777 /* ReaderConnectionUnderlyingErrorDisplaying.swift */, - 03E471C5293A2E95001A58AD /* CardPresentModalBuiltInReaderCheckingDeviceSupport.swift */, - 03E471C9293E0A2F001A58AD /* CardPresentModalBuiltInConfigurationProgress.swift */, + 03E471C5293A2E95001A58AD /* CardPresentModalTapToPayReaderCheckingDeviceSupport.swift */, + 03E471C9293E0A2F001A58AD /* CardPresentModalTapToPayConfigurationProgress.swift */, 03E471CB293E0FB8001A58AD /* CardPresentModalProgressDisplaying.swift */, - 03E471C7293A3075001A58AD /* CardPresentModalBuiltInConnectingToReader.swift */, + 03E471C7293A3075001A58AD /* CardPresentModalTapToPayConnectingToReader.swift */, 311237ED2714DA240033C44E /* CardPresentModalDisplayMessage.swift */, - 03E471D52942222D001A58AD /* CardPresentModalBuiltInFollowReaderInstructions.swift */, + 03E471D52942222D001A58AD /* CardPresentModalTapToPayFollowReaderInstructions.swift */, D8815B0026385E3F00EDAD62 /* CardPresentModalTapCard.swift */, D8815B0C263861A400EDAD62 /* CardPresentModalSuccess.swift */, - 03E471D929424E81001A58AD /* CardPresentModalBuiltInSuccess.swift */, + 03E471D929424E81001A58AD /* CardPresentModalTapToPaySuccess.swift */, 01F42C172CE34AD1003D0A5A /* CardPresentModalSuccessEmailSent.swift */, - 01F42C152CE34AB3003D0A5A /* CardPresentModalBuiltInSuccessEmailSent.swift */, + 01F42C152CE34AB3003D0A5A /* CardPresentModalTapToPaySuccessEmailSent.swift */, E16715CA26663B0B00326230 /* CardPresentModalSuccessWithoutEmail.swift */, - 03E471DB29424EC9001A58AD /* CardPresentModalBuiltInSuccessWithoutEmail.swift */, + 03E471DB29424EC9001A58AD /* CardPresentModalTapToPaySuccessWithoutEmail.swift */, D8815B122638686200EDAD62 /* CardPresentModalError.swift */, 011D7A342CEC87B60007C187 /* CardPresentModalErrorEmailSent.swift */, 01929C332CEF634E006C79ED /* CardPresentModalErrorWithoutEmail.swift */, @@ -13004,7 +13004,7 @@ 03E471CD293F63B4001A58AD /* PaymentCaptureOrchestrator.swift */, B9C4AB2628002AF3007008B8 /* PaymentReceiptEmailParameterDeterminer.swift */, D82BB3A926454F3300A82741 /* CardPresentModalProcessing.swift */, - 03E471D729424CF8001A58AD /* CardPresentModalBuiltInReaderProcessing.swift */, + 03E471D729424CF8001A58AD /* CardPresentModalTapToPayReaderProcessing.swift */, 311D21E7264AEDB900102316 /* CardPresentModalScanningForReader.swift */, 31B0551D264B3C7A00134D87 /* CardPresentModalFoundReader.swift */, E1E125A926EB42530068A9B0 /* CardPresentModalUpdateProgress.swift */, @@ -15533,7 +15533,7 @@ 57896D6625362B0C000E8C4D /* TitleAndEditableValueTableViewCellViewModel.swift in Sources */, 0205021E27C8B6C600FB1C6B /* InboxEligibilityUseCase.swift in Sources */, 26E7EE6E29300E8100793045 /* AnalyticsTopPerformersCard.swift in Sources */, - 03E471DA29424E82001A58AD /* CardPresentModalBuiltInSuccess.swift in Sources */, + 03E471DA29424E82001A58AD /* CardPresentModalTapToPaySuccess.swift in Sources */, CE26360E2CCFC78100BE59E2 /* WooShippingSelectedRate.swift in Sources */, 26E1BECE251CD9F80096D0A1 /* RefundItemViewModel.swift in Sources */, DE7B479027A153C20018742E /* CouponSearchUICommand.swift in Sources */, @@ -15719,7 +15719,7 @@ DE7E5E912B4FD8F0002E28D2 /* BlazeTargetTopicPickerViewModel.swift in Sources */, 31F92DE125E85F6A00DE04DF /* ConnectedReaderTableViewCell.swift in Sources */, 26C6E8E026E2B7BD00C7BB0F /* CountrySelectorViewModel.swift in Sources */, - 03E471D62942222E001A58AD /* CardPresentModalBuiltInFollowReaderInstructions.swift in Sources */, + 03E471D62942222E001A58AD /* CardPresentModalTapToPayFollowReaderInstructions.swift in Sources */, B60B5026292D308A00178C26 /* AnalyticsTimeRangeCard.swift in Sources */, E138D4FC269EEAFE006EA5C6 /* CardPresentPaymentsOnboardingViewModel.swift in Sources */, 039D948F276113490044EF38 /* UIView+SuperviewConstraints.swift in Sources */, @@ -15777,7 +15777,7 @@ 026826C42BF59E410036F959 /* PointOfSaleCardPresentPaymentFoundReaderView.swift in Sources */, EE8B42142BFB4A8A0077C4E7 /* LastOrderDashboardRow.swift in Sources */, 03E471D2293FA8B2001A58AD /* BluetoothCardReaderPaymentAlertsProvider.swift in Sources */, - 03E471CA293E0A30001A58AD /* CardPresentModalBuiltInConfigurationProgress.swift in Sources */, + 03E471CA293E0A30001A58AD /* CardPresentModalTapToPayConfigurationProgress.swift in Sources */, 31AD0B1126E9575F000B6391 /* CardPresentModalConnectingFailed.swift in Sources */, 576EA39425264C9B00AFC0B3 /* RefundConfirmationViewModel.swift in Sources */, 02ED3D272C23315400ED6F3E /* PointOfSaleCardPresentPaymentReaderUpdateFailedView.swift in Sources */, @@ -15931,6 +15931,7 @@ DEC51A9D274F8528009F3DF4 /* JCPJetpackInstallStepsViewModel.swift in Sources */, 455DC3A327393C7E00D4644C /* OrderDatesFilterViewController.swift in Sources */, 45B6F4EF27592A4000C18782 /* ReviewsView.swift in Sources */, + 019A86842D89C13800ABBB71 /* TapToPayCardReaderPaymentAlertsProvider.swift in Sources */, 86A4EBBD2B2F1306008011F5 /* ThemesPreviewViewModel.swift in Sources */, B6F37970293798ED00718561 /* AnalyticsHubTodayRangeData.swift in Sources */, CCFBBCF629C4B9A30081B595 /* ComponentsListViewModel.swift in Sources */, @@ -16013,7 +16014,7 @@ EE1905862B57BBE300617C53 /* BlazePaymentMethodsView.swift in Sources */, D89CFF3A25B43BBB000E4683 /* WrongAccountErrorViewModel.swift in Sources */, 02B2829227C4808D004A332A /* InfiniteScrollIndicator.swift in Sources */, - 03E471DC29424EC9001A58AD /* CardPresentModalBuiltInSuccessWithoutEmail.swift in Sources */, + 03E471DC29424EC9001A58AD /* CardPresentModalTapToPaySuccessWithoutEmail.swift in Sources */, 45C91CFE25E55A1200FD8812 /* ShippingLabelAddressTopBannerFactory.swift in Sources */, B5DBF3CB20E149CC00B53AED /* AuthenticatedState.swift in Sources */, B90DDF7C2A9E21DF009CFDA2 /* NewTaxRateSelectorView.swift in Sources */, @@ -16021,7 +16022,7 @@ DEB387A32C36474F0025256E /* GoogleAdsDashboardCard.swift in Sources */, E1BE703A265E6F47006CA4D9 /* CardPresentModalScanningFailed.swift in Sources */, D89CFFDD25B44468000E4683 /* ULAccountMismatchViewController.swift in Sources */, - 03E471C6293A2E95001A58AD /* CardPresentModalBuiltInReaderCheckingDeviceSupport.swift in Sources */, + 03E471C6293A2E95001A58AD /* CardPresentModalTapToPayReaderCheckingDeviceSupport.swift in Sources */, B687940C27699D420092BCA0 /* RefundFeesCalculationUseCase.swift in Sources */, 02EA6BF82435E80600FFF90A /* ImageDownloader.swift in Sources */, CECC758623D21AC200486676 /* AggregateOrderItem.swift in Sources */, @@ -16297,7 +16298,7 @@ 0216272B2379662C000208D2 /* DefaultProductFormTableViewModel.swift in Sources */, 45E9A6E424DAE1EA00A600E8 /* ProductReviewsViewController.swift in Sources */, DED039292BC7A04B005D0571 /* StorePerformanceView.swift in Sources */, - 03E471C4293A1F8D001A58AD /* BuiltInReaderConnectionAlertsProvider.swift in Sources */, + 03E471C4293A1F8D001A58AD /* TapToPayReaderConnectionAlertsProvider.swift in Sources */, 20CC1EDD2AFA99DF006BD429 /* InPersonPaymentsMenuViewModel.swift in Sources */, 011DF3462C53A919000AFDD9 /* PointOfSaleCardPresentPaymentActivityIndicatingMessageView.swift in Sources */, D8736B7522F1FE1600A14A29 /* BadgeLabel.swift in Sources */, @@ -16433,7 +16434,7 @@ 01D082402C5B9EAB007FE81F /* POSBackgroundAppearanceKey.swift in Sources */, DAF689E12CD23954008B8398 /* WooAddCustomPackageView.swift in Sources */, B5A82EE7210263460053ADC8 /* UIViewController+Helpers.swift in Sources */, - 03E471D829424CF9001A58AD /* CardPresentModalBuiltInReaderProcessing.swift in Sources */, + 03E471D829424CF9001A58AD /* CardPresentModalTapToPayReaderProcessing.swift in Sources */, 4506BD712461965300FE6377 /* ProductVisibilityViewController.swift in Sources */, 02E3B62D290631B3007E0F13 /* AccountCreationFormViewModel.swift in Sources */, 0304E36628BE1EED00A80191 /* LeftImageTitleSubtitleToggleTableViewCell.swift in Sources */, @@ -16464,7 +16465,7 @@ 0260B1B12805321B00FCFE8C /* OrderDetailsPaymentAlertsProtocol.swift in Sources */, 4556ED38270645A6005CBC0D /* ShippingLabelCarrierSectionHeader.swift in Sources */, 267C01CF29E89E1700FCC97B /* StorePlanSynchronizer.swift in Sources */, - 013D2FB42CFEFEC600845D75 /* BuiltInCardReaderMerchantEducationPresenter.swift in Sources */, + 013D2FB42CFEFEC600845D75 /* TapToPayCardReaderMerchantEducationPresenter.swift in Sources */, B541B21C2189F3D8008FE7C1 /* StringStyles.swift in Sources */, B58B4AB82108F14700076FDD /* NoticeNotificationInfo.swift in Sources */, DA4080722CC2967C002A4577 /* WooShippingAddCustomPackageViewModel.swift in Sources */, @@ -16649,7 +16650,7 @@ 0295CDC02D6477C400865E27 /* POSNoticeView.swift in Sources */, DE279BA826E9C8E3002BA963 /* ShippingLabelSinglePackage.swift in Sources */, 01AAD8142D92E37A0081D60B /* PointOfSaleOrderSyncCouponsErrorMessageView.swift in Sources */, - 01F42C162CE34AB8003D0A5A /* CardPresentModalBuiltInSuccessEmailSent.swift in Sources */, + 01F42C162CE34AB8003D0A5A /* CardPresentModalTapToPaySuccessEmailSent.swift in Sources */, 028FF8E32AA1E1C60038964F /* ProductDetailsCellViewModel+AddOns.swift in Sources */, DEC2962726C17AD8005A056B /* ShippingLabelCustomsForm+Localization.swift in Sources */, 26A630FE253F63C300CBC3B1 /* RefundableOrderItem.swift in Sources */, @@ -16793,7 +16794,7 @@ 025FDD3423717D4900824006 /* AztecEditorViewController.swift in Sources */, 451B1740258B7EFB00836277 /* AddAttributeOptionsViewController.swift in Sources */, AE6C4FDF28A15BFE00EAC00D /* FeatureAnnouncementCardCell.swift in Sources */, - 20762BA12C18A66400758305 /* CardPresentPaymentBuiltInReaderConnectionAlertsProvider.swift in Sources */, + 20762BA12C18A66400758305 /* CardPresentPaymentTapToPayReaderConnectionAlertsProvider.swift in Sources */, 02562AD0296D1FD100980404 /* View+DividerStyle.swift in Sources */, CE5F462723AAC8C0006B1A5C /* RefundDetailsViewModel.swift in Sources */, 02E222C829FBA60F004579A1 /* WooAnalyticsEvent+ProductFormAI.swift in Sources */, @@ -16816,7 +16817,6 @@ CE1EC8EC20B8A3FF009762BF /* LeftImageTableViewCell.swift in Sources */, DE8C946E264699B600C94823 /* PluginListViewModel.swift in Sources */, 021125992578D9C20075AD2A /* ShippingLabelPrintingInstructionsView.swift in Sources */, - 03E471D42942096B001A58AD /* BuiltInCardReaderPaymentAlertsProvider.swift in Sources */, 026826C72BF59E410036F959 /* PointOfSaleCardPresentPaymentScanningForReadersView.swift in Sources */, EEBB81712D8C0839008D6CE5 /* CollapsibleShipmentItemCard.swift in Sources */, 68E952CC287536010095A23D /* SafariView.swift in Sources */, @@ -16844,7 +16844,7 @@ DEC75CC22BC4E53800763801 /* DashboardCustomizationView.swift in Sources */, B5C3876421C41B9F006CE970 /* UIApplication+Woo.swift in Sources */, 09E41E1D27B90B3C00BFCB7C /* BulkUpdateViewModel.swift in Sources */, - 032E481D2982996E00469D92 /* CardPresentModalBuiltInConnectingFailedNonRetryable.swift in Sources */, + 032E481D2982996E00469D92 /* CardPresentModalTapToPayConnectingFailedNonRetryable.swift in Sources */, DED9740D2AD7D27000122EB4 /* BlazeCampaignListViewModel.swift in Sources */, EEC0120F2CE34B87003B865B /* WooAnalyticsEvent+WPCOMSuspendedSite.swift in Sources */, 0379C51B27BFE23F00A7E284 /* RefundConfirmationCardDetailsCell.swift in Sources */, @@ -17051,7 +17051,7 @@ 684AB83C2873DF04003DFDD1 /* CardReaderManualsViewModel.swift in Sources */, 86F5FFE22CA302B300C767C4 /* CustomFieldsListViewModel.swift in Sources */, 575472812452185300A94C3C /* PushNotification.swift in Sources */, - 0396CFAD2981476900E91436 /* CardPresentModalBuiltInConnectingFailed.swift in Sources */, + 0396CFAD2981476900E91436 /* CardPresentModalTapToPayConnectingFailed.swift in Sources */, 02C1853B27FF0D9C00ABD764 /* RefundSubmissionUseCase.swift in Sources */, 02DFD5062B2048C50048CD70 /* ProductStepperViewModel.swift in Sources */, 02B334A12BEB712600A46774 /* CollapsibleCustomerCardAddressViewModel.swift in Sources */, @@ -17173,7 +17173,7 @@ 02C0CD2C23B5BC9600F880B1 /* DefaultImageService.swift in Sources */, B9D19A442AE7B66B00D944D8 /* CustomAmountRowView.swift in Sources */, EE09DE062C2C0C9600A32680 /* ProductCreationAIStartingInfoView.swift in Sources */, - 03E471C8293A3076001A58AD /* CardPresentModalBuiltInConnectingToReader.swift in Sources */, + 03E471C8293A3076001A58AD /* CardPresentModalTapToPayConnectingToReader.swift in Sources */, EEC259462B4556B6004D703C /* BlazeEditAdHostingController.swift in Sources */, EE5B5BC72AB8379C009BCBD6 /* AddProductWithAIContainerViewModel.swift in Sources */, 0365986529AF942700F297D3 /* PaymentSettingsFlowHint.swift in Sources */, @@ -17213,7 +17213,7 @@ 037D270D28CA444F00A3F924 /* CardReaderModalFlowViewControllerProtocol.swift in Sources */, B5AA7B3D20ED5D15004DA14F /* SessionManager.swift in Sources */, B53B3F37219C75AC00DF1EB6 /* OrderLoaderViewController.swift in Sources */, - 03E471BE29388787001A58AD /* BuiltInCardReaderConnectionController.swift in Sources */, + 03E471BE29388787001A58AD /* TapToPayCardReaderConnectionController.swift in Sources */, DE4D239C29B06642003A4B5D /* WPComMagicLinkView.swift in Sources */, 02F843DA273646A30017FE12 /* JetpackBenefitsBanner.swift in Sources */, 027D4A8D2526FD1800108626 /* SettingsViewController.swift in Sources */, @@ -17435,7 +17435,7 @@ 31E906A326CC91A70099A985 /* CardReaderConnectionControllerTests.swift in Sources */, 02829BAA288FA8B300951E1E /* MockUserNotification.swift in Sources */, D85B8336222FCDA1002168F3 /* StatusListTableViewCellTests.swift in Sources */, - 03B9E52D2A150D16005C77F5 /* MockBuiltInCardReaderConnectionControllerFactory.swift in Sources */, + 03B9E52D2A150D16005C77F5 /* MockTapToPayCardReaderConnectionControllerFactory.swift in Sources */, 2084B7AE2C77845C00EFBD2E /* PointOfSaleCardPresentPaymentReaderUpdateCompletionAlertViewModelTests.swift in Sources */, 3198A1E82694DC7200597213 /* MockKnownReadersProvider.swift in Sources */, DEC51B04276B30F6009F3DF4 /* SystemStatusReportViewModelTests.swift in Sources */, diff --git a/WooCommerce/WooCommerceTests/Mocks/MockCardReader.swift b/WooCommerce/WooCommerceTests/Mocks/MockCardReader.swift index 15b9b94c131..03d72c0c5eb 100644 --- a/WooCommerce/WooCommerceTests/Mocks/MockCardReader.swift +++ b/WooCommerce/WooCommerceTests/Mocks/MockCardReader.swift @@ -45,14 +45,14 @@ struct MockCardReader { locationId: nil) } - static func appleBuiltIn() -> CardReader { + static func tapToPay() -> CardReader { CardReader(serial: "APPLE-BUILT-IN-SIMULATOR-1", vendorIdentifier: "SIMULATOR", - name: "Simulated Apple Built In Reader", + name: "Simulated Tap to Pay Reader", status: .init(connected: false, remembered: false), softwareVersion: nil, batteryLevel: nil, - readerType: .appleBuiltIn, + readerType: .tapToPay, locationId: "st_simulated") } } diff --git a/WooCommerce/WooCommerceTests/Mocks/MockCardReaderSupportDeterminer.swift b/WooCommerce/WooCommerceTests/Mocks/MockCardReaderSupportDeterminer.swift index 7df757fa1ec..6371481c9b9 100644 --- a/WooCommerce/WooCommerceTests/Mocks/MockCardReaderSupportDeterminer.swift +++ b/WooCommerce/WooCommerceTests/Mocks/MockCardReaderSupportDeterminer.swift @@ -18,14 +18,14 @@ final class MockCardReaderSupportDeterminer: CardReaderSupportDetermining { return shouldReturnHasPreviousTapToPayUsage } - var shouldReturnSiteSupportsLocalMobileReader: Bool = false - func siteSupportsLocalMobileReader() -> Bool { - return shouldReturnSiteSupportsLocalMobileReader + var shouldReturnSiteSupportsTapToPayReader: Bool = false + func siteSupportsTapToPayReader() -> Bool { + return shouldReturnSiteSupportsTapToPayReader } - var shouldReturnDeviceSupportsLocalMobileReader: Bool = false - func deviceSupportsLocalMobileReader() async -> Bool { - return shouldReturnDeviceSupportsLocalMobileReader + var shouldReturnDeviceSupportsTapToPayReader: Bool = false + func deviceSupportsTapToPayReader() async -> Bool { + return shouldReturnDeviceSupportsTapToPayReader } var mockFirstTapToPayTransactionDate: Date? = nil diff --git a/WooCommerce/WooCommerceTests/Mocks/MockBuiltInCardReaderConnectionControllerFactory.swift b/WooCommerce/WooCommerceTests/Mocks/MockTapToPayCardReaderConnectionControllerFactory.swift similarity index 82% rename from WooCommerce/WooCommerceTests/Mocks/MockBuiltInCardReaderConnectionControllerFactory.swift rename to WooCommerce/WooCommerceTests/Mocks/MockTapToPayCardReaderConnectionControllerFactory.swift index c32969fb0d5..c8c82140a0c 100644 --- a/WooCommerce/WooCommerceTests/Mocks/MockBuiltInCardReaderConnectionControllerFactory.swift +++ b/WooCommerce/WooCommerceTests/Mocks/MockTapToPayCardReaderConnectionControllerFactory.swift @@ -2,8 +2,8 @@ import Foundation @testable import WooCommerce import Yosemite -class MockBuiltInCardReaderConnectionControllerFactory: BuiltInCardReaderConnectionControllerBuilding { - typealias AlertProvider = BuiltInReaderConnectionAlertsProvider +class MockTapToPayCardReaderConnectionControllerFactory: TapToPayCardReaderConnectionControllerBuilding { + typealias AlertProvider = TapToPayReaderConnectionAlertsProvider typealias AlertPresenter = SilenceablePassthroughCardPresentPaymentAlertsPresenter var spyCreateConnectionControllerSiteID: Int64? = nil @@ -14,20 +14,20 @@ class MockBuiltInCardReaderConnectionControllerFactory: BuiltInCardReaderConnect var onSearchAndConnectCalled: (() -> Void)? = nil - var mockConnectionController: MockBuiltInCardReaderConnectionController? = nil + var mockConnectionController: MockTapToPayCardReaderConnectionController? = nil func createConnectionController(forSiteID siteID: Int64, alertPresenter: AlertPresenter, configuration: CardPresentPaymentsConfiguration, analyticsTracker: CardReaderConnectionAnalyticsTracker, - allowTermsOfServiceAcceptance: Bool) -> BuiltInCardReaderConnectionControlling { + allowTermsOfServiceAcceptance: Bool) -> TapToPayCardReaderConnectionControlling { spyCreateConnectionControllerSiteID = siteID spyCreateConnectionControllerAlertsPresenter = alertPresenter spyCreateConnectionControllerConfiguration = configuration spyCreateConnectionControllerAnalyticsTracker = analyticsTracker spyCreateConnectionControllerAllowTermsOfServiceAcceptance = allowTermsOfServiceAcceptance - let mockConnectionController = MockBuiltInCardReaderConnectionController( + let mockConnectionController = MockTapToPayCardReaderConnectionController( onSearchAndConnectCalled: onSearchAndConnectCalled) self.mockConnectionController = mockConnectionController connectionControllerCreated() @@ -37,7 +37,7 @@ class MockBuiltInCardReaderConnectionControllerFactory: BuiltInCardReaderConnect var connectionControllerCreated: () -> Void = {} } -class MockBuiltInCardReaderConnectionController: BuiltInCardReaderConnectionControlling { +class MockTapToPayCardReaderConnectionController: TapToPayCardReaderConnectionControlling { let onSearchAndConnectCalled: (() -> Void)? init(onSearchAndConnectCalled: (() -> Void)?) { diff --git a/WooCommerce/WooCommerceTests/ViewModels/CardPresentPayments/CollectOrderPaymentUseCaseTests.swift b/WooCommerce/WooCommerceTests/ViewModels/CardPresentPayments/CollectOrderPaymentUseCaseTests.swift index a53c9590e4a..f1d79056cbd 100644 --- a/WooCommerce/WooCommerceTests/ViewModels/CardPresentPayments/CollectOrderPaymentUseCaseTests.swift +++ b/WooCommerce/WooCommerceTests/ViewModels/CardPresentPayments/CollectOrderPaymentUseCaseTests.swift @@ -15,7 +15,7 @@ final class CollectOrderPaymentUseCaseTests: XCTestCase { private var mockPreflightController: MockCardPresentPaymentPreflightController! private var mockAnalyticsTracker: MockCollectOrderPaymentAnalyticsTracker! private var mockPaymentOrchestrator: MockPaymentCaptureOrchestrator! - private var useCase: CollectOrderPaymentUseCase! private var receiptEligibilityUseCase: MockReceiptEligibilityUseCase! @@ -52,7 +52,7 @@ final class CollectOrderPaymentUseCaseTests: XCTestCase { stores: stores, paymentOrchestrator: mockPaymentOrchestrator, alertsPresenter: alertsPresenter, - tapToPayAlertsProvider: BuiltInCardReaderPaymentAlertsProvider(), + tapToPayAlertsProvider: TapToPayCardReaderPaymentAlertsProvider(), bluetoothAlertsProvider: BluetoothCardReaderPaymentAlertsProvider(transactionType: .collectPayment), preflightController: mockPreflightController, analyticsTracker: mockAnalyticsTracker, @@ -127,7 +127,7 @@ final class CollectOrderPaymentUseCaseTests: XCTestCase { func test_collectPayment_with_below_minimum_amount_results_in_failure_and_tracks_collectPaymentFailed_event() throws { // Given let order = Order.fake().copy(total: "0.49") - let useCase = CollectOrderPaymentUseCase( siteID: 122, @@ -138,7 +138,7 @@ final class CollectOrderPaymentUseCaseTests: XCTestCase { stores: stores, paymentOrchestrator: mockPaymentOrchestrator, alertsPresenter: alertsPresenter, - tapToPayAlertsProvider: BuiltInCardReaderPaymentAlertsProvider(), + tapToPayAlertsProvider: TapToPayCardReaderPaymentAlertsProvider(), bluetoothAlertsProvider: BluetoothCardReaderPaymentAlertsProvider(transactionType: .collectPayment), preflightController: mockPreflightController, analyticsTracker: mockAnalyticsTracker) diff --git a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/CardReaderSettings/BluetoothCardReaderSettingsConnectedViewModelTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/CardReaderSettings/BluetoothCardReaderSettingsConnectedViewModelTests.swift index bea5c3fff08..c0286d574e2 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/CardReaderSettings/BluetoothCardReaderSettingsConnectedViewModelTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/CardReaderSettings/BluetoothCardReaderSettingsConnectedViewModelTests.swift @@ -524,7 +524,7 @@ final class BluetoothCardReaderSettingsConnectedViewModelTests: XCTestCase { func test_when_connected_to_a_built_in_reader_it_isnt_displayed() { // Given mockStoresManager = MockCardPresentPaymentsStoresManager( - connectedReaders: [MockCardReader.appleBuiltIn()], + connectedReaders: [MockCardReader.tapToPay()], discoveredReaders: [], sessionManager: SessionManager.testingInstance ) @@ -549,7 +549,7 @@ final class BluetoothCardReaderSettingsConnectedViewModelTests: XCTestCase { func test_when_connected_to_a_built_in_reader_it_disconnects() { // Given mockStoresManager = MockCardPresentPaymentsStoresManager( - connectedReaders: [MockCardReader.appleBuiltIn()], + connectedReaders: [MockCardReader.tapToPay()], discoveredReaders: [], sessionManager: SessionManager.testingInstance ) @@ -579,7 +579,7 @@ final class BluetoothCardReaderSettingsConnectedViewModelTests: XCTestCase { func test_when_automatically_disconnects_from_built_in_reader_it_tracks_that_in_analytics() throws { // Given mockStoresManager = MockCardPresentPaymentsStoresManager( - connectedReaders: [MockCardReader.appleBuiltIn()], + connectedReaders: [MockCardReader.tapToPay()], discoveredReaders: [], sessionManager: SessionManager.testingInstance ) @@ -596,7 +596,7 @@ final class BluetoothCardReaderSettingsConnectedViewModelTests: XCTestCase { delayToShowUpdateSuccessMessage: .milliseconds(1)) // Then - let expectedEvent = WooAnalyticsStat.manageCardReadersBuiltInReaderAutoDisconnect.rawValue + let expectedEvent = WooAnalyticsStat.manageCardReadersTapToPayReaderAutoDisconnect.rawValue let eventIndex = try XCTUnwrap(analyticsProvider.receivedEvents.firstIndex(of: expectedEvent)) let eventProperties = try XCTUnwrap(analyticsProvider.receivedProperties[eventIndex]) assertEqual(WooAnalyticsEvent.InPersonPayments.unknownGatewayID, eventProperties[WooAnalyticsEvent.InPersonPayments.Keys.gatewayID] as? String) diff --git a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewModelTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewModelTests.swift index d4e480a226e..cd68cd0e0d4 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewModelTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewModelTests.swift @@ -228,7 +228,7 @@ final class InPersonPaymentsMenuViewModelTests: XCTestCase { paymentMethods: [.cardPresent], currencies: [.INR], paymentGateways: [WCPayAccount.gatewayID], - supportedReaders: [.appleBuiltIn], + supportedReaders: [.tapToPay], supportedPluginVersions: [.init(plugin: .wcPay, minimumVersion: "4.0.0")], minimumAllowedChargeAmount: NSDecimalNumber(string: "0.5"), stripeSmallestCurrencyUnitMultiplier: 100, diff --git a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayAwarenessMomentDeterminerTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayAwarenessMomentDeterminerTests.swift index 48f54e9ba92..b3081177239 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayAwarenessMomentDeterminerTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayAwarenessMomentDeterminerTests.swift @@ -62,7 +62,7 @@ struct TapToPayAwarenessMomentDeterminerTests { userDefaults.hasPreviousPresentation = false userDefaults.hasFirstAttempt = true cardPresentPaymentsOnboardingUseCase.state = .completed(plugin: .wcPayOnly) - cardReaderSupportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = false + cardReaderSupportDeterminer.shouldReturnDeviceSupportsTapToPayReader = false // When let shouldPresent = await sut.shouldPresent() @@ -76,8 +76,8 @@ struct TapToPayAwarenessMomentDeterminerTests { userDefaults.hasPreviousPresentation = false userDefaults.hasFirstAttempt = true cardPresentPaymentsOnboardingUseCase.state = .completed(plugin: .wcPayOnly) - cardReaderSupportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = true - cardReaderSupportDeterminer.shouldReturnSiteSupportsLocalMobileReader = false + cardReaderSupportDeterminer.shouldReturnDeviceSupportsTapToPayReader = true + cardReaderSupportDeterminer.shouldReturnSiteSupportsTapToPayReader = false // When let shouldPresent = await sut.shouldPresent() @@ -91,8 +91,8 @@ struct TapToPayAwarenessMomentDeterminerTests { userDefaults.hasPreviousPresentation = false userDefaults.hasFirstAttempt = true cardPresentPaymentsOnboardingUseCase.state = .completed(plugin: .wcPayOnly) - cardReaderSupportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = true - cardReaderSupportDeterminer.shouldReturnSiteSupportsLocalMobileReader = true + cardReaderSupportDeterminer.shouldReturnDeviceSupportsTapToPayReader = true + cardReaderSupportDeterminer.shouldReturnSiteSupportsTapToPayReader = true cardReaderSupportDeterminer.shouldReturnHasPreviousTapToPayUsage = true // When @@ -107,8 +107,8 @@ struct TapToPayAwarenessMomentDeterminerTests { userDefaults.hasPreviousPresentation = false userDefaults.hasFirstAttempt = true cardPresentPaymentsOnboardingUseCase.state = .completed(plugin: .wcPayOnly) - cardReaderSupportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = true - cardReaderSupportDeterminer.shouldReturnSiteSupportsLocalMobileReader = true + cardReaderSupportDeterminer.shouldReturnDeviceSupportsTapToPayReader = true + cardReaderSupportDeterminer.shouldReturnSiteSupportsTapToPayReader = true cardReaderSupportDeterminer.shouldReturnHasPreviousTapToPayUsage = false // When @@ -123,8 +123,8 @@ struct TapToPayAwarenessMomentDeterminerTests { userDefaults.hasPreviousPresentation = false userDefaults.hasFirstAttempt = true cardPresentPaymentsOnboardingUseCase.state = .codPaymentGatewayNotSetUp(plugin: .wcPay) - cardReaderSupportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = true - cardReaderSupportDeterminer.shouldReturnSiteSupportsLocalMobileReader = true + cardReaderSupportDeterminer.shouldReturnDeviceSupportsTapToPayReader = true + cardReaderSupportDeterminer.shouldReturnSiteSupportsTapToPayReader = true cardReaderSupportDeterminer.shouldReturnHasPreviousTapToPayUsage = false // When diff --git a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionControllerTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionControllerTests.swift index ea410abc4ab..d9803993395 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionControllerTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayReconnectionControllerTests.swift @@ -8,9 +8,9 @@ final class TapToPayReconnectionControllerTests: XCTestCase { private var stores: MockStoresManager! private var storageManager: MockStorageManager! - private var connectionControllerFactory: MockBuiltInCardReaderConnectionControllerFactory! + private var connectionControllerFactory: MockTapToPayCardReaderConnectionControllerFactory! private var onboardingCache: CardPresentPaymentOnboardingStateCache! - private var sut: TapToPayReconnectionController! + private var sut: TapToPayReconnectionController! private let sampleSiteID: Int64 = 12891 private let sampleConfiguration: CardPresentPaymentsConfiguration = CardPresentPaymentsConfiguration(country: .US) @@ -18,7 +18,7 @@ final class TapToPayReconnectionControllerTests: XCTestCase { let sessionManager = SessionManager.makeForTesting(authenticated: true) sessionManager.setStoreId(sampleSiteID) stores = MockStoresManager(sessionManager: sessionManager) - connectionControllerFactory = MockBuiltInCardReaderConnectionControllerFactory() + connectionControllerFactory = MockTapToPayCardReaderConnectionControllerFactory() onboardingCache = CardPresentPaymentOnboardingStateCache() onboardingCache.update(.completed(plugin: .wcPayPreferred)) sut = TapToPayReconnectionController(stores: stores, @@ -50,8 +50,8 @@ final class TapToPayReconnectionControllerTests: XCTestCase { let supportDeterminer = MockCardReaderSupportDeterminer() supportDeterminer.shouldReturnLocationIsAuthorized = true supportDeterminer.shouldReturnConnectedReader = nil - supportDeterminer.shouldReturnSiteSupportsLocalMobileReader = true - supportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = true + supportDeterminer.shouldReturnSiteSupportsTapToPayReader = true + supportDeterminer.shouldReturnDeviceSupportsTapToPayReader = true supportDeterminer.shouldReturnHasPreviousTapToPayUsage = true waitFor { promise in @@ -72,8 +72,8 @@ final class TapToPayReconnectionControllerTests: XCTestCase { let supportDeterminer = MockCardReaderSupportDeterminer() supportDeterminer.shouldReturnLocationIsAuthorized = true supportDeterminer.shouldReturnConnectedReader = nil - supportDeterminer.shouldReturnSiteSupportsLocalMobileReader = true - supportDeterminer.shouldReturnDeviceSupportsLocalMobileReader = true + supportDeterminer.shouldReturnSiteSupportsTapToPayReader = true + supportDeterminer.shouldReturnDeviceSupportsTapToPayReader = true supportDeterminer.shouldReturnHasPreviousTapToPayUsage = true waitFor { promise in diff --git a/WooCommerce/WooCommerceTests/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModelTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModelTests.swift index 8a58099e518..bccc108c069 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModelTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/Orders/Payment Methods/PaymentMethodsViewModelTests.swift @@ -1039,7 +1039,7 @@ final class PaymentMethodsViewModelTests: XCTestCase { // When var onFailureCalled: Bool = false - viewModel.collectPayment(using: .localMobile, on: UIViewController(), useCase: useCase, onSuccess: {}, onFailure: { + viewModel.collectPayment(using: .tapToPay, on: UIViewController(), useCase: useCase, onSuccess: {}, onFailure: { onFailureCalled = true }) @@ -1071,7 +1071,7 @@ final class PaymentMethodsViewModelTests: XCTestCase { // When var onFailureCalled: Bool = false - viewModel.collectPayment(using: .localMobile, on: UIViewController(), useCase: useCase, onSuccess: {}, onFailure: { + viewModel.collectPayment(using: .tapToPay, on: UIViewController(), useCase: useCase, onSuccess: {}, onFailure: { onFailureCalled = true }) @@ -1130,7 +1130,7 @@ private extension PaymentMethodsViewModelTests { private func simulate(tapToPayDeviceAvailability: Bool, on stores: MockStoresManager) { stores.whenReceivingAction(ofType: CardPresentPaymentAction.self) { action in switch action { - case let .checkDeviceSupport(_, _, .localMobile, _, completion): + case let .checkDeviceSupport(_, _, .tapToPay, _, completion): completion(tapToPayDeviceAvailability) default: break diff --git a/Yosemite/Yosemite/Actions/CardPresentPaymentAction.swift b/Yosemite/Yosemite/Actions/CardPresentPaymentAction.swift index c14fb2a5218..447377ab16c 100644 --- a/Yosemite/Yosemite/Actions/CardPresentPaymentAction.swift +++ b/Yosemite/Yosemite/Actions/CardPresentPaymentAction.swift @@ -83,7 +83,7 @@ public enum CardPresentPaymentAction: Action { case observeCardReaderUpdateState(onCompletion: (AnyPublisher) -> Void) /// Observe TTP Terms and Services accept event - case observeBuiltInCardReaderAcceptToS(onCompletion: (AnyPublisher) -> Void) + case observeTapToPayCardReaderAcceptToS(onCompletion: (AnyPublisher) -> Void) /// Update card reader firmware. case startCardReaderUpdate diff --git a/Yosemite/Yosemite/Model/Model.swift b/Yosemite/Yosemite/Model/Model.swift index 2a958d6be9d..f7ba8000391 100644 --- a/Yosemite/Yosemite/Model/Model.swift +++ b/Yosemite/Yosemite/Model/Model.swift @@ -207,7 +207,7 @@ public typealias LoadSiteCurrentPlanError = Networking.LoadSiteCurrentPlanError public typealias StoredProductSettings = Networking.StoredProductSettings public typealias CardReader = Hardware.CardReader public typealias CardReaderConnectionOptions = Hardware.CardReaderConnectionOptions -public typealias BuiltInCardReaderConnectionOptions = Hardware.BuiltInCardReaderConnectionOptions +public typealias TapToPayCardReaderConnectionOptions = Hardware.TapToPayCardReaderConnectionOptions public typealias CardReaderDiscoveryMethod = Hardware.CardReaderDiscoveryMethod public typealias CardReaderEvent = Hardware.CardReaderEvent public typealias CardReaderInput = Hardware.CardReaderInput diff --git a/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift b/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift index 1ca080e5638..5b00e94d08a 100644 --- a/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift +++ b/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift @@ -52,7 +52,7 @@ public struct CardPresentPaymentsConfiguration: Equatable { paymentMethods: [.cardPresent], currencies: [.USD], paymentGateways: [WCPayAccount.gatewayID, StripeAccount.gatewayID], - supportedReaders: [.chipper, .stripeM2, .appleBuiltIn], + supportedReaders: [.chipper, .stripeM2, .tapToPay], supportedPluginVersions: [ .init(plugin: .wcPay, minimumVersion: "3.2.1"), .init(plugin: .stripe, minimumVersion: "6.2.0") @@ -96,7 +96,7 @@ public struct CardPresentPaymentsConfiguration: Equatable { paymentMethods: [.cardPresent], currencies: [.GBP], paymentGateways: [WCPayAccount.gatewayID], - supportedReaders: shouldAllowTapToPayInUK ? [.wisepad3, .appleBuiltIn] : [.wisepad3], + supportedReaders: shouldAllowTapToPayInUK ? [.wisepad3, .tapToPay] : [.wisepad3], supportedPluginVersions: [.init(plugin: .wcPay, minimumVersion: "4.4.0")], minimumAllowedChargeAmount: NSDecimalNumber(string: "0.3"), stripeSmallestCurrencyUnitMultiplier: 100, diff --git a/Yosemite/Yosemite/Model/Storage/CardReaderType+ReadOnlyConvertible.swift b/Yosemite/Yosemite/Model/Storage/CardReaderType+ReadOnlyConvertible.swift index a5a6dc27235..1bdcd311c71 100644 --- a/Yosemite/Yosemite/Model/Storage/CardReaderType+ReadOnlyConvertible.swift +++ b/Yosemite/Yosemite/Model/Storage/CardReaderType+ReadOnlyConvertible.swift @@ -16,8 +16,8 @@ extension StorageCardReaderType: ReadOnlyConvertible { self = .stripeM2 case .wisepad3: self = .wisepad3 - case .appleBuiltIn: - self = .appleBuiltIn + case .tapToPay: + self = .tapToPay case .other: self = .other } @@ -33,8 +33,8 @@ extension StorageCardReaderType: ReadOnlyConvertible { return .stripeM2 case .wisepad3: return .wisepad3 - case .appleBuiltIn: - return .appleBuiltIn + case .tapToPay: + return .tapToPay case .other: return .other } diff --git a/Yosemite/Yosemite/Stores/CardPresentPaymentStore.swift b/Yosemite/Yosemite/Stores/CardPresentPaymentStore.swift index e9f9d633304..65ec710acd9 100644 --- a/Yosemite/Yosemite/Stores/CardPresentPaymentStore.swift +++ b/Yosemite/Yosemite/Stores/CardPresentPaymentStore.swift @@ -127,8 +127,8 @@ public final class CardPresentPaymentStore: Store { cancelRefund(onCompletion: completion) case .observeCardReaderUpdateState(onCompletion: let completion): observeCardReaderUpdateState(onCompletion: completion) - case .observeBuiltInCardReaderAcceptToS(let completion): - observeBuiltInCardReaderAcceptToS(onCompletion: completion) + case .observeTapToPayCardReaderAcceptToS(let completion): + observeTapToPayCardReaderAcceptToS(onCompletion: completion) case .startCardReaderUpdate: startCardReaderUpdate() case .reset: @@ -196,7 +196,7 @@ private extension CardPresentPaymentStore { $0.readerType == .chipper || $0.readerType == .stripeM2 || $0.readerType == .wisepad3 || - $0.readerType == .appleBuiltIn + $0.readerType == .tapToPay }) onReaderDiscovered(supportedReaders) } @@ -400,8 +400,8 @@ private extension CardPresentPaymentStore { onCompletion(cardReaderService.softwareUpdateEvents) } - func observeBuiltInCardReaderAcceptToS(onCompletion: @escaping (AnyPublisher) -> Void) { - onCompletion(cardReaderService.builtInCardReaderAcceptToSEvents) + func observeTapToPayCardReaderAcceptToS(onCompletion: @escaping (AnyPublisher) -> Void) { + onCompletion(cardReaderService.tapToPayCardReaderAcceptToSEvents) } func startCardReaderUpdate() { diff --git a/Yosemite/YosemiteTests/Mocks/CardPresentPayments/MockCardReaderService.swift b/Yosemite/YosemiteTests/Mocks/CardPresentPayments/MockCardReaderService.swift index f571eac7d70..37512e054f0 100644 --- a/Yosemite/YosemiteTests/Mocks/CardPresentPayments/MockCardReaderService.swift +++ b/Yosemite/YosemiteTests/Mocks/CardPresentPayments/MockCardReaderService.swift @@ -20,7 +20,7 @@ final class MockCardReaderService: CardReaderService { CurrentValueSubject(.none).eraseToAnyPublisher() } - var builtInCardReaderAcceptToSEvents: AnyPublisher { + var tapToPayCardReaderAcceptToSEvents: AnyPublisher { PassthroughSubject().eraseToAnyPublisher() } diff --git a/Yosemite/YosemiteTests/Model/CardPresentConfigurationTests.swift b/Yosemite/YosemiteTests/Model/CardPresentConfigurationTests.swift index df2bfe31681..b715a5fa05c 100644 --- a/Yosemite/YosemiteTests/Model/CardPresentConfigurationTests.swift +++ b/Yosemite/YosemiteTests/Model/CardPresentConfigurationTests.swift @@ -12,7 +12,7 @@ class CardPresentConfigurationTests: XCTestCase { XCTAssertEqual(configuration.paymentGateways, [Constants.PaymentGateway.wcpay, Constants.PaymentGateway.stripe]) XCTAssertEqual(configuration.paymentMethods, [.cardPresent]) XCTAssertEqual(configuration.purchaseCardReaderUrl(utmProvider: MockUTMParameterProvider()).absoluteString, Constants.PurchaseURL.us) - assertEqual([.chipper, .stripeM2, .appleBuiltIn], configuration.supportedReaders) + assertEqual([.chipper, .stripeM2, .tapToPay], configuration.supportedReaders) } // MARK: - Puerto Rico Tests @@ -47,7 +47,7 @@ class CardPresentConfigurationTests: XCTestCase { XCTAssertEqual(configuration.paymentGateways, [Constants.PaymentGateway.wcpay]) XCTAssertEqual(configuration.paymentMethods, [.cardPresent]) XCTAssertEqual(configuration.purchaseCardReaderUrl(utmProvider: MockUTMParameterProvider()).absoluteString, Constants.PurchaseURL.gb) - assertEqual([.wisepad3, .appleBuiltIn], configuration.supportedReaders) + assertEqual([.wisepad3, .tapToPay], configuration.supportedReaders) assertEqual(10000, configuration.contactlessLimitAmount) } diff --git a/Yosemite/YosemiteTests/Stores/AppSettingsStoreTests.swift b/Yosemite/YosemiteTests/Stores/AppSettingsStoreTests.swift index d1ba700620e..03b92569eac 100644 --- a/Yosemite/YosemiteTests/Stores/AppSettingsStoreTests.swift +++ b/Yosemite/YosemiteTests/Stores/AppSettingsStoreTests.swift @@ -1065,7 +1065,7 @@ extension AppSettingsStoreTests { // When let actualValue = waitFor { promise in - let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: 1, cardReaderType: .appleBuiltIn) { maybeDate in + let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: 1, cardReaderType: .tapToPay) { maybeDate in promise(maybeDate) } self.subject?.onAction(action) @@ -1079,12 +1079,12 @@ extension AppSettingsStoreTests { // Given let siteID: Int64 = 1 try fileStorage?.deleteFile(at: expectedGeneralAppSettingsFileURL) - let updateAction = AppSettingsAction.storeInPersonPaymentsTransactionIfFirst(siteID: siteID, cardReaderType: .appleBuiltIn) + let updateAction = AppSettingsAction.storeInPersonPaymentsTransactionIfFirst(siteID: siteID, cardReaderType: .tapToPay) subject?.onAction(updateAction) // When let actualValue = waitFor { promise in - let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: siteID, cardReaderType: .appleBuiltIn) { maybeDate in + let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: siteID, cardReaderType: .tapToPay) { maybeDate in promise(maybeDate) } self.subject?.onAction(action) @@ -1098,12 +1098,12 @@ extension AppSettingsStoreTests { func test_given_a_date_was_only_previously_stored_for_another_site_loadFirstInPersonPaymentsTransactionDate_returns_nil() throws { // Given try fileStorage?.deleteFile(at: expectedGeneralAppSettingsFileURL) - let updateAction = AppSettingsAction.storeInPersonPaymentsTransactionIfFirst(siteID: 1, cardReaderType: .appleBuiltIn) + let updateAction = AppSettingsAction.storeInPersonPaymentsTransactionIfFirst(siteID: 1, cardReaderType: .tapToPay) subject?.onAction(updateAction) // When let actualValue = waitFor { promise in - let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: 100, cardReaderType: .appleBuiltIn) { maybeDate in + let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: 100, cardReaderType: .tapToPay) { maybeDate in promise(maybeDate) } self.subject?.onAction(action) @@ -1122,7 +1122,7 @@ extension AppSettingsStoreTests { // When let actualValue = waitFor { promise in - let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: siteID, cardReaderType: .appleBuiltIn) { maybeDate in + let action = AppSettingsAction.loadFirstInPersonPaymentsTransactionDate(siteID: siteID, cardReaderType: .tapToPay) { maybeDate in promise(maybeDate) } self.subject?.onAction(action) diff --git a/Yosemite/YosemiteTests/Stores/CardPresentPaymentStoreTests.swift b/Yosemite/YosemiteTests/Stores/CardPresentPaymentStoreTests.swift index 0539bf1996a..364ef86d1b0 100644 --- a/Yosemite/YosemiteTests/Stores/CardPresentPaymentStoreTests.swift +++ b/Yosemite/YosemiteTests/Stores/CardPresentPaymentStoreTests.swift @@ -701,8 +701,8 @@ final class CardPresentPaymentStoreTests: XCTestCase { func test_checkDeviceSupport_action_passes_configuration_provider_to_service() { let action = CardPresentPaymentAction.checkDeviceSupport(siteID: sampleSiteID, - cardReaderType: .appleBuiltIn, - discoveryMethod: .localMobile, + cardReaderType: .tapToPay, + discoveryMethod: .tapToPay, minimumOperatingSystemVersionOverride: nil, onCompletion: { _ in }) @@ -728,8 +728,8 @@ final class CardPresentPaymentStoreTests: XCTestCase { let expectedVersion = OperatingSystemVersion(majorVersion: 16, minorVersion: 4, patchVersion: 0) let action = CardPresentPaymentAction.checkDeviceSupport( siteID: sampleSiteID, - cardReaderType: .appleBuiltIn, - discoveryMethod: .localMobile, + cardReaderType: .tapToPay, + discoveryMethod: .tapToPay, minimumOperatingSystemVersionOverride: expectedVersion, onCompletion: { _ in })