From 4c9775c3508d0631d0e03cfe614c0a8ed75d4673 Mon Sep 17 00:00:00 2001 From: samiuelson Date: Tue, 28 Oct 2025 17:08:02 +0100 Subject: [PATCH 1/4] Enable Stripe Payment Gateway in the UK --- .../Model/Payments/CardPresentPaymentsConfiguration.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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, From 0030d81b304a99d49e26634c9c43b383cf49d846 Mon Sep 17 00:00:00 2001 From: samiuelson Date: Wed, 29 Oct 2025 13:26:46 +0100 Subject: [PATCH 2/4] Update CardPresentConfigurationTests.swift --- .../YosemiteTests/Model/CardPresentConfigurationTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From d59851332d83b248653e5c5724a3c6e60765e27c Mon Sep 17 00:00:00 2001 From: samiuelson Date: Wed, 29 Oct 2025 13:36:25 +0100 Subject: [PATCH 3/4] Update CardPresentPaymentsOnboardingUseCaseTests --- .../CardPresentPaymentsOnboardingUseCaseTests.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift index 5168f586e44..68d76a9794b 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_etup_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() { From ab76921029b33a10df1b81daad003e0da9cac3c8 Mon Sep 17 00:00:00 2001 From: Samuel Urbanowicz Date: Wed, 29 Oct 2025 14:27:13 +0100 Subject: [PATCH 4/4] Fix typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../CardPresentPaymentsOnboardingUseCaseTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift index 68d76a9794b..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_etup_not_completed_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)