Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading