fix(router): aggregate hotfixes for v0.5.10 (#1204)

Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
Co-authored-by: Jagan Elavarasan <jaganelavarasan@gmail.com>
Co-authored-by: SamraatBansal <samraatbansal7@gmail.com>
Co-authored-by: sai-harsha-vardhan <harsha111hero@gmail.com>
Co-authored-by: Sangamesh Kulkarni <59434228+Sangamesh26@users.noreply.github.com>
This commit is contained in:
ItsMeShashank
2023-05-18 19:20:55 +05:30
committed by GitHub
parent afceda55ad
commit 9cc1ceec69
5 changed files with 35 additions and 10 deletions

View File

@ -1128,6 +1128,18 @@ pub fn connector_selection<F>(
where
F: Send + Clone,
{
if let Some(ref connector_name) = payment_data.payment_attempt.connector {
let connector_data = api::ConnectorData::get_connector_by_name(
&state.conf.connectors,
connector_name,
api::GetToken::Connector,
)
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("invalid connector name received in payment attempt")?;
return Ok(api::ConnectorCallType::Single(connector_data));
}
let mut routing_data = storage::RoutingData {
routed_through: payment_data.payment_attempt.connector.clone(),
algorithm: payment_data