mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
feat(core): Implement 3ds decision manger for V2 (#7022)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use std::fmt;
|
||||
use std::{collections::HashMap, fmt};
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
@ -159,3 +159,25 @@ pub enum ValueType {
|
||||
EnumVariants(Vec<EuclidValue>),
|
||||
Number,
|
||||
}
|
||||
|
||||
impl EuclidAnalysable for common_enums::AuthenticationType {
|
||||
fn get_dir_value_for_analysis(&self, rule_name: String) -> Vec<(dir::DirValue, Metadata)> {
|
||||
let auth = self.to_string();
|
||||
|
||||
let dir_value = match self {
|
||||
Self::ThreeDs => dir::DirValue::AuthenticationType(Self::ThreeDs),
|
||||
Self::NoThreeDs => dir::DirValue::AuthenticationType(Self::NoThreeDs),
|
||||
};
|
||||
|
||||
vec![(
|
||||
dir_value,
|
||||
HashMap::from_iter([(
|
||||
"AUTHENTICATION_TYPE".to_string(),
|
||||
serde_json::json!({
|
||||
"rule_name": rule_name,
|
||||
"Authentication_type": auth,
|
||||
}),
|
||||
)]),
|
||||
)]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user