mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
feat(core): add support for multiple merchant_connector_account (#2655)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Shanks <shashank.attarde@juspay.in>
This commit is contained in:
@ -361,6 +361,7 @@ pub async fn get_or_update_dispute_object(
|
||||
connector_updated_at: dispute_details.updated_at,
|
||||
profile_id: None,
|
||||
evidence: None,
|
||||
merchant_connector_id: payment_attempt.merchant_connector_id.clone(),
|
||||
};
|
||||
state
|
||||
.store
|
||||
@ -1194,6 +1195,7 @@ async fn fetch_mca_and_connector(
|
||||
&state.conf.connectors,
|
||||
&mca.connector_name,
|
||||
api::GetToken::Connector,
|
||||
Some(mca.merchant_connector_id.clone()),
|
||||
)
|
||||
.change_context(errors::ApiErrorResponse::InvalidRequestData {
|
||||
message: "invalid connector name received".to_string(),
|
||||
@ -1202,10 +1204,12 @@ async fn fetch_mca_and_connector(
|
||||
|
||||
Ok((mca, connector))
|
||||
} else {
|
||||
// Merchant connector account is already being queried, it is safe to set connector id as None
|
||||
let connector = api::ConnectorData::get_connector_by_name(
|
||||
&state.conf.connectors,
|
||||
connector_name_or_mca_id,
|
||||
api::GetToken::Connector,
|
||||
None,
|
||||
)
|
||||
.change_context(errors::ApiErrorResponse::InvalidRequestData {
|
||||
message: "invalid connector name received".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user