Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-harsha-vardhan committed Apr 26, 2024
1 parent c77248c commit e7bca3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/router/src/core/authentication.rs
Expand Up @@ -272,7 +272,7 @@ pub async fn perform_pre_authentication<F: Clone + Send>(
let poll_config = state
.store
.find_config_by_key_unwrap_or(
&format!("poll_config_external_three_ds_{authentication_connector_name}"),
&core_types::PollConfig::get_poll_config_key(authentication_connector_name),
Some(default_config_str),
)
.await
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/core/payments.rs
Expand Up @@ -1149,7 +1149,7 @@ impl<Ctx: PaymentMethodRetrieve> PaymentRedirectFlow<Ctx> for PaymentAuthenticat
let poll_config = state
.store
.find_config_by_key_unwrap_or(
&format!("poll_config_external_three_ds_{connector}"),
&router_types::PollConfig::get_poll_config_key(connector),
Some(default_config_str),
)
.await
Expand Down
6 changes: 6 additions & 0 deletions crates/router/src/types.rs
Expand Up @@ -1153,6 +1153,12 @@ pub struct PollConfig {
pub frequency: i8,
}

impl PollConfig {
pub fn get_poll_config_key(connector: String) -> String {
format!("poll_config_external_three_ds_{connector}")
}
}

impl Default for PollConfig {
fn default() -> Self {
Self {
Expand Down

0 comments on commit e7bca3d

Please sign in to comment.