From f0dc37438b7a6c4b25acff941aca13545217d307 Mon Sep 17 00:00:00 2001 From: Vrishab Srivatsa <136090360+vsrivatsa-juspay@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:13:58 +0530 Subject: [PATCH] fix(cards): Allow card cvc 000 (#2387) --- crates/cards/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cards/src/lib.rs b/crates/cards/src/lib.rs index d47d4f33a1ca..5308718826ae 100644 --- a/crates/cards/src/lib.rs +++ b/crates/cards/src/lib.rs @@ -15,7 +15,7 @@ pub struct CardSecurityCode(StrongSecret); impl TryFrom for CardSecurityCode { type Error = error_stack::Report; fn try_from(csc: u16) -> Result { - if (1..=9999).contains(&csc) { + if (0..=9999).contains(&csc) { Ok(Self(StrongSecret::new(csc))) } else { Err(report!(errors::ValidationError::InvalidValue {