Skip to content

Commit

Permalink
refactor(router): refactor relay flow addressing comments of relay fe…
Browse files Browse the repository at this point in the history
…ature pr
  • Loading branch information
ShankarSinghC committed Dec 27, 2024
1 parent e393a03 commit c05a4bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions crates/hyperswitch_domain_models/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Relay {
) -> Self {
let relay_id = id_type::RelayId::generate();
Self {
id: relay_id.clone(),
id: relay_id,
connector_resource_id: relay_request.connector_resource_id.clone(),
connector_id: relay_request.connector_id.clone(),
profile_id: profile_id.clone(),
Expand Down Expand Up @@ -198,7 +198,7 @@ impl super::behaviour::Conversion for Relay {
.request_data
.map(|data| {
serde_json::to_value(data).change_context(ValidationError::InvalidValue {
message: "Failed while decrypting business profile data".to_string(),
message: "Failed to serialize relay request data".to_string(),
})
})
.transpose()?
Expand All @@ -225,13 +225,13 @@ impl super::behaviour::Conversion for Relay {
connector_id: item.connector_id,
profile_id: item.profile_id,
merchant_id: item.merchant_id,
relay_type: enums::RelayType::Refund,
relay_type: item.relay_type,
request_data: item
.request_data
.map(|data| {
serde_json::from_value(data.expose()).change_context(
ValidationError::InvalidValue {
message: "Failed while decrypting business profile data".to_string(),
message: "Failed to deserialize relay request data".to_string(),
},
)
})
Expand All @@ -258,7 +258,7 @@ impl super::behaviour::Conversion for Relay {
.request_data
.map(|data| {
serde_json::to_value(data).change_context(ValidationError::InvalidValue {
message: "Failed while decrypting business profile data".to_string(),
message: "Failed to serialize relay request data".to_string(),
})
})
.transpose()?
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/core/relay/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub async fn construct_relay_refund_router_data<'a, F>(
let webhook_url = Some(payments::helpers::create_webhook_url(
&state.base_url.clone(),
merchant_id,
connector_name,
connector_account.merchant_connector_id.get_string_repr(),
));

let supported_connector = &state
Expand Down

0 comments on commit c05a4bf

Please # to comment.