Skip to content

Commit

Permalink
changes to configs urls
Browse files Browse the repository at this point in the history
  • Loading branch information
KiranKBR committed Aug 6, 2024
1 parent 4504e09 commit a384d96
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
15 changes: 12 additions & 3 deletions crates/hyperswitch_interfaces/src/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct Connectors {
pub bankofamerica: ConnectorParams,
pub billwerk: ConnectorParams,
pub bitpay: ConnectorParams,
pub bluesnap: ConnectorParamsWithThreeBaseUrls,
pub bluesnap: ConnectorParamsWithSecondaryBaseUrl,
pub boku: ConnectorParams,
pub braintree: ConnectorParams,
pub cashtocode: ConnectorParams,
Expand Down Expand Up @@ -139,7 +139,7 @@ pub struct ConnectorParamsWithFileUploadUrl {
pub base_url_file_upload: String,
}

/// struct ConnectorParamsWithSecondaryBaseUrl
/// struct ConnectorParamsWithThreeBaseUrls
#[derive(Debug, Deserialize, Clone, Default, router_derive::ConfigValidate)]
#[serde(default)]
pub struct ConnectorParamsWithThreeBaseUrls {
Expand All @@ -148,5 +148,14 @@ pub struct ConnectorParamsWithThreeBaseUrls {
/// secondary base url
pub secondary_base_url: String,
/// third base url
pub third_base_url: Option<String>,
pub third_base_url: String,
}
/// struct ConnectorParamsWithSecondaryBaseUrl
#[derive(Debug, Deserialize, Clone, Default, router_derive::ConfigValidate)]
#[serde(default)]
pub struct ConnectorParamsWithSecondaryBaseUrl {
/// base url
pub base_url: String,
/// secondary base url
pub secondary_base_url: String,
}
21 changes: 3 additions & 18 deletions crates/router/src/connector/adyen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1946,12 +1946,7 @@ impl
connectors: &settings::Connectors,
) -> CustomResult<String, errors::ConnectorError> {
let endpoint = build_env_specific_endpoint(
connectors
.adyen
.third_base_url
.clone()
.ok_or(errors::ConnectorError::FailedToObtainIntegrationUrl)?
.as_str(),
connectors.adyen.third_base_url.as_str(),
req.test_mode,
&req.connector_meta_data,
)?;
Expand Down Expand Up @@ -2042,12 +2037,7 @@ impl
connectors: &settings::Connectors,
) -> CustomResult<String, errors::ConnectorError> {
let endpoint = build_env_specific_endpoint(
connectors
.adyen
.third_base_url
.clone()
.ok_or(errors::ConnectorError::FailedToObtainIntegrationUrl)?
.as_str(),
connectors.adyen.third_base_url.as_str(),
req.test_mode,
&req.connector_meta_data,
)?;
Expand Down Expand Up @@ -2138,12 +2128,7 @@ impl
connectors: &settings::Connectors,
) -> CustomResult<String, errors::ConnectorError> {
let endpoint = build_env_specific_endpoint(
connectors
.adyen
.third_base_url
.clone()
.ok_or(errors::ConnectorError::FailedToObtainIntegrationUrl)?
.as_str(),
connectors.adyen.third_base_url.as_str(),
req.test_mode,
&req.connector_meta_data,
)?;
Expand Down

0 comments on commit a384d96

Please sign in to comment.