diff --git a/Modules/Sources/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift b/Modules/Sources/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift index f1621774c4b..78b615d4249 100644 --- a/Modules/Sources/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift +++ b/Modules/Sources/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift @@ -95,9 +95,12 @@ public struct CardPresentPaymentsConfiguration: Equatable { countryCode: country, paymentMethods: [.cardPresent], currencies: [.GBP], - paymentGateways: [WCPayAccount.gatewayID], + paymentGateways: [WCPayAccount.gatewayID, StripeAccount.gatewayID], supportedReaders: [.wisepad3, .tapToPay], - supportedPluginVersions: [.init(plugin: .wcPay, minimumVersion: "4.4.0")], + supportedPluginVersions: [ + .init(plugin: .wcPay, minimumVersion: "4.4.0"), + .init(plugin: .stripe, minimumVersion: "6.2.0") + ], minimumAllowedChargeAmount: NSDecimalNumber(string: "0.3"), stripeSmallestCurrencyUnitMultiplier: 100, contactlessLimitAmount: 10000, diff --git a/Modules/Tests/YosemiteTests/Model/CardPresentConfigurationTests.swift b/Modules/Tests/YosemiteTests/Model/CardPresentConfigurationTests.swift index d2a6393b36f..0c3ea3dbdaa 100644 --- a/Modules/Tests/YosemiteTests/Model/CardPresentConfigurationTests.swift +++ b/Modules/Tests/YosemiteTests/Model/CardPresentConfigurationTests.swift @@ -44,7 +44,7 @@ class CardPresentConfigurationTests: XCTestCase { let configuration = CardPresentPaymentsConfiguration(country: .GB) XCTAssertTrue(configuration.isSupportedCountry) XCTAssertEqual(configuration.currencies, [.GBP]) - XCTAssertEqual(configuration.paymentGateways, [Constants.PaymentGateway.wcpay]) + XCTAssertEqual(configuration.paymentGateways, [Constants.PaymentGateway.wcpay, Constants.PaymentGateway.stripe]) XCTAssertEqual(configuration.paymentMethods, [.cardPresent]) XCTAssertEqual(configuration.purchaseCardReaderUrl(utmProvider: MockUTMParameterProvider()).absoluteString, Constants.PurchaseURL.gb) assertEqual([.wisepad3, .tapToPay], configuration.supportedReaders) diff --git a/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift index 5168f586e44..bdfebb1bcbd 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift @@ -202,7 +202,7 @@ class CardPresentPaymentsOnboardingUseCaseTests: XCTestCase { XCTAssertNotEqual(state, .countryNotSupported(countryCode: .GB)) } - func test_onboarding_returns_country_unsupported_with_uk_when_stripe_plugin_installed() { + func test_onboarding_returns_setup_not_completed_with_uk_when_stripe_plugin_installed() { // Given setupCountry(country: .gb) setupStripePlugin(status: .active, version: .minimumSupportedVersion) @@ -214,10 +214,10 @@ class CardPresentPaymentsOnboardingUseCaseTests: XCTestCase { let state = useCase.state // Then - XCTAssertEqual(state, .countryNotSupportedStripe(plugin: .stripe, countryCode: .GB)) + XCTAssertEqual(state, .pluginSetupNotCompleted(plugin: .stripe)) } - func test_onboarding_returns_setup_not_completed_stripe_when_stripe_and_wcPay_plugins_are_installed_in_UK() { + func test_onboarding_returns_select_plugin_when_stripe_and_wcPay_plugins_are_installed_in_UK() { // Given setupCountry(country: .gb) setupStripePlugin(status: .active, version: .minimumSupportedVersion) @@ -230,7 +230,7 @@ class CardPresentPaymentsOnboardingUseCaseTests: XCTestCase { let state = useCase.state // Then - XCTAssertEqual(state, .pluginSetupNotCompleted(plugin: .wcPay)) + XCTAssertEqual(state, .selectPlugin(pluginSelectionWasCleared: false)) } func test_onboarding_returns_wcpay_plugin_unsupported_version_for_uk_when_version_unsupported() {