Skip to content

Commit

Permalink
refactor(cards,router): Remove duplicated card number interface
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjoon-km committed Apr 21, 2024
1 parent 110bf22 commit d2027aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions crates/cards/src/validate.rs
Expand Up @@ -24,10 +24,6 @@ impl CardNumber {
pub fn get_card_isin(self) -> String {
self.0.peek().chars().take(6).collect::<String>()
}

pub fn get_extended_card_bin(self) -> String {
self.0.peek().chars().take(8).collect::<String>()
}
pub fn get_card_no(self) -> String {
self.0.peek().chars().collect::<String>()
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/core/blocklist/utils.rs
Expand Up @@ -355,7 +355,7 @@ where
.as_ref()
.and_then(|pm_data| match pm_data {
api_models::payments::PaymentMethodData::Card(card) => {
Some(card.card_number.clone().get_extended_card_bin())
Some(card.card_number.clone().get_card_extended_bin())
}
_ => None,
});
Expand Down

0 comments on commit d2027aa

Please sign in to comment.