mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +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)]
|
||||
#[serde(rename_all = "UPPERCASE")]
|
||||
pub enum InstructionSource {
|
||||
// Cardholder initiated transaction
|
||||
Cit,
|
||||
// Merchant initiated transaction
|
||||
Mit,
|
||||
#[serde(rename = "CIT")]
|
||||
CardholderInitiatedTransaction,
|
||||
#[serde(rename = "MIT")]
|
||||
MerchantInitiatedTransaction,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
@ -520,14 +519,14 @@ fn get_instruction_details(item: &types::PaymentsAuthorizeRouterData) -> Option<
|
||||
return Some(Instruction {
|
||||
mode: InstructionMode::Initial,
|
||||
transaction_type: InstructionType::Unscheduled,
|
||||
source: InstructionSource::Cit,
|
||||
source: InstructionSource::CardholderInitiatedTransaction,
|
||||
create_registration: Some(true),
|
||||
});
|
||||
} else if item.request.mandate_id.is_some() {
|
||||
return Some(Instruction {
|
||||
mode: InstructionMode::Repeated,
|
||||
transaction_type: InstructionType::Unscheduled,
|
||||
source: InstructionSource::Mit,
|
||||
source: InstructionSource::MerchantInitiatedTransaction,
|
||||
create_registration: None,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user