mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
refactor(connector): [ACI] Use verbose names for InstructionSource variants (#1575)
This commit is contained in:
@ -300,12 +300,11 @@ pub enum InstructionType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "UPPERCASE")]
|
|
||||||
pub enum InstructionSource {
|
pub enum InstructionSource {
|
||||||
// Cardholder initiated transaction
|
#[serde(rename = "CIT")]
|
||||||
Cit,
|
CardholderInitiatedTransaction,
|
||||||
// Merchant initiated transaction
|
#[serde(rename = "MIT")]
|
||||||
Mit,
|
MerchantInitiatedTransaction,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
@ -520,14 +519,14 @@ fn get_instruction_details(item: &types::PaymentsAuthorizeRouterData) -> Option<
|
|||||||
return Some(Instruction {
|
return Some(Instruction {
|
||||||
mode: InstructionMode::Initial,
|
mode: InstructionMode::Initial,
|
||||||
transaction_type: InstructionType::Unscheduled,
|
transaction_type: InstructionType::Unscheduled,
|
||||||
source: InstructionSource::Cit,
|
source: InstructionSource::CardholderInitiatedTransaction,
|
||||||
create_registration: Some(true),
|
create_registration: Some(true),
|
||||||
});
|
});
|
||||||
} else if item.request.mandate_id.is_some() {
|
} else if item.request.mandate_id.is_some() {
|
||||||
return Some(Instruction {
|
return Some(Instruction {
|
||||||
mode: InstructionMode::Repeated,
|
mode: InstructionMode::Repeated,
|
||||||
transaction_type: InstructionType::Unscheduled,
|
transaction_type: InstructionType::Unscheduled,
|
||||||
source: InstructionSource::Mit,
|
source: InstructionSource::MerchantInitiatedTransaction,
|
||||||
create_registration: None,
|
create_registration: None,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user