Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector): accept connector_transaction_id in error_response of connector flows for Cybersource and BOA #3043

Closed
wants to merge 11 commits into from
2 changes: 1 addition & 1 deletion crates/router/src/connector/bankofamerica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl ConnectorCommon for Bankofamerica {
message,
reason: Some(connector_reason),
attempt_status: None,
connector_transaction_id: None,
connector_transaction_id: response.id,
})
}
}
Expand Down
7 changes: 4 additions & 3 deletions crates/router/src/connector/bankofamerica/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ impl<F>
reason: error_response.error_information.reason,
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
connector_transaction_id: Some(error_response.id),
}),
..item.data
}),
Expand Down Expand Up @@ -606,7 +606,7 @@ impl<F>
reason: error_response.error_information.reason,
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
connector_transaction_id: Some(error_response.id),
}),
..item.data
}),
Expand Down Expand Up @@ -664,7 +664,7 @@ impl<F>
reason: error_response.error_information.reason,
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
connector_transaction_id: Some(error_response.id),
}),
..item.data
}),
Expand Down Expand Up @@ -941,6 +941,7 @@ impl TryFrom<types::RefundsResponseRouterData<api::RSync, BankOfAmericaRsyncResp
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BankOfAmericaErrorResponse {
pub id: Option<String>,
pub error_information: Option<ErrorInformation>,
pub status: Option<String>,
pub message: Option<String>,
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/cybersource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl ConnectorCommon for Cybersource {
message,
reason: Some(connector_reason),
attempt_status: None,
connector_transaction_id: None,
connector_transaction_id: response.id,
})
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/connector/cybersource/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ impl<F, T>
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ErrorResponse {
pub id: Option<String>,
pub error_information: Option<ErrorInformation>,
pub status: Option<String>,
pub message: Option<String>,
Expand Down
Loading