mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	fix(connector): [Bluesnap] Throw proper error message for redirection scenario (#1367)
Signed-off-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Co-authored-by: Prasunna Soppa <prasunna.soppa@juspay.in>
This commit is contained in:
		| @ -429,6 +429,7 @@ pub trait CardData { | ||||
|         delimiter: String, | ||||
|     ) -> Secret<String>; | ||||
|     fn get_expiry_date_as_yyyymm(&self, delimiter: &str) -> Secret<String>; | ||||
|     fn get_expiry_year_4_digit(&self) -> Secret<String>; | ||||
| } | ||||
|  | ||||
| impl CardData for api::Card { | ||||
| @ -453,17 +454,21 @@ impl CardData for api::Card { | ||||
|         )) | ||||
|     } | ||||
|     fn get_expiry_date_as_yyyymm(&self, delimiter: &str) -> Secret<String> { | ||||
|         let mut x = self.card_exp_year.peek().clone(); | ||||
|         if x.len() == 2 { | ||||
|             x = format!("20{}", x); | ||||
|         } | ||||
|         let year = self.get_expiry_year_4_digit(); | ||||
|         Secret::new(format!( | ||||
|             "{}{}{}", | ||||
|             x, | ||||
|             year.peek(), | ||||
|             delimiter, | ||||
|             self.card_exp_month.peek().clone() | ||||
|         )) | ||||
|     } | ||||
|     fn get_expiry_year_4_digit(&self) -> Secret<String> { | ||||
|         let mut year = self.card_exp_year.peek().clone(); | ||||
|         if year.len() == 2 { | ||||
|             year = format!("20{}", year); | ||||
|         } | ||||
|         Secret::new(year) | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[track_caller] | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 chikke srujan
					chikke srujan