mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	feat(cards): add credit card number validation (#889)
Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
This commit is contained in:
		| @ -370,11 +370,7 @@ impl CardData for api::Card { | ||||
|         Secret::new(year[year.len() - 2..].to_string()) | ||||
|     } | ||||
|     fn get_card_issuer(&self) -> Result<CardIssuer, Error> { | ||||
|         let card: Secret<String, pii::CardNumber> = self | ||||
|             .card_number | ||||
|             .clone() | ||||
|             .map(|card| card.split_whitespace().collect()); | ||||
|         get_card_issuer(card.peek().clone().as_str()) | ||||
|         get_card_issuer(self.card_number.peek()) | ||||
|     } | ||||
|     fn get_card_expiry_month_year_2_digit_with_delimiter( | ||||
|         &self, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 phillyphil91
					phillyphil91