diff --git a/paymentsheet/src/main/java/com/stripe/android/common/model/CommonConfiguration.kt b/paymentsheet/src/main/java/com/stripe/android/common/model/CommonConfiguration.kt index 80df4ec7da1..0d5fdd0030f 100644 --- a/paymentsheet/src/main/java/com/stripe/android/common/model/CommonConfiguration.kt +++ b/paymentsheet/src/main/java/com/stripe/android/common/model/CommonConfiguration.kt @@ -231,7 +231,8 @@ private fun String.isEKClientSecretValid(): Boolean { return Regex(EK_CLIENT_SECRET_VALID_REGEX_PATTERN).matches(this) } -private const val EK_CLIENT_SECRET_VALID_REGEX_PATTERN = "^ek_[^_](.)+$" +// The `uk_` prefix is used by the Stripe Dashboard Mobile App for MOTO +private const val EK_CLIENT_SECRET_VALID_REGEX_PATTERN = "^(ek_|uk_)[^_](.)+\$" internal fun CommonConfiguration.containsVolatileDifferences( other: CommonConfiguration diff --git a/paymentsheet/src/test/java/com/stripe/android/paymentsheet/PaymentSheetConfigurationKtxTest.kt b/paymentsheet/src/test/java/com/stripe/android/paymentsheet/PaymentSheetConfigurationKtxTest.kt index 96365fb21a7..cf0315f7ba7 100644 --- a/paymentsheet/src/test/java/com/stripe/android/paymentsheet/PaymentSheetConfigurationKtxTest.kt +++ b/paymentsheet/src/test/java/com/stripe/android/paymentsheet/PaymentSheetConfigurationKtxTest.kt @@ -44,6 +44,8 @@ class PaymentSheetConfigurationKtxTest { fun `'validate' should succeed when ephemeral key secret is of correct format`() { getConfig("ek_askljdlkasfhgasdfjls").validate(isLiveMode = false) getConfig("ek_test_iiuwfhdaiuhasdvkcjn32n").validate(isLiveMode = false) + getConfig("uk_iiuwfhdaiuhasdvkcjn32n").validate(isLiveMode = false) + getConfig("uk_test_iiuwfhdaiuhasdvkcjn32n").validate(isLiveMode = false) } @Test