mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +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:
@ -446,7 +446,17 @@ pub mod payout_routing_algorithm {
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[serde(tag = "type", content = "data", rename_all = "snake_case")]
|
||||
pub enum RoutingAlgorithm {
|
||||
Single(api_enums::RoutableConnectors),
|
||||
Single(RoutableConnectorChoice),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum RoutableConnectorChoice {
|
||||
ConnectorName(api_enums::RoutableConnectors),
|
||||
ConnectorId {
|
||||
merchant_connector_id: String,
|
||||
connector: api_enums::RoutableConnectors,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
@ -458,13 +468,13 @@ pub enum RoutingAlgorithm {
|
||||
into = "StraightThroughAlgorithmSerde"
|
||||
)]
|
||||
pub enum StraightThroughAlgorithm {
|
||||
Single(api_enums::RoutableConnectors),
|
||||
Single(RoutableConnectorChoice),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[serde(tag = "type", content = "data", rename_all = "snake_case")]
|
||||
pub enum StraightThroughAlgorithmInner {
|
||||
Single(api_enums::RoutableConnectors),
|
||||
Single(RoutableConnectorChoice),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
||||
@ -2106,6 +2106,9 @@ pub struct PaymentsResponse {
|
||||
|
||||
/// Denotes the action(approve or reject) taken by merchant in case of manual review. Manual review can occur when the transaction is marked as risky by the frm_processor, payment processor or when there is underpayment/over payment incase of crypto payment
|
||||
pub merchant_decision: Option<String>,
|
||||
|
||||
/// Identifier of the connector ( merchant connector account ) which was chosen to make the payment
|
||||
pub merchant_connector_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user