diff --git a/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs b/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs index 8444c7b9dd..b6e85aea3c 100644 --- a/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs @@ -163,7 +163,10 @@ impl .authentication_request .as_ref() .and_then(|req| req.three_ds_requestor_challenge_ind.as_ref()) - .and_then(|v| v.first().cloned()); + .and_then(|ind| match ind { + ThreedsRequestorChallengeInd::Single(s) => Some(s.clone()), + ThreedsRequestorChallengeInd::Multiple(v) => v.first().cloned(), + }); let message_extension = response .authentication_request @@ -680,10 +683,17 @@ pub struct NetceteraAuthenticationFailureResponse { #[serde(rename_all = "camelCase")] pub struct AuthenticationRequest { #[serde(rename = "threeDSRequestorChallengeInd")] - pub three_ds_requestor_challenge_ind: Option>, + pub three_ds_requestor_challenge_ind: Option, pub message_extension: Option, } +#[derive(Debug, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ThreedsRequestorChallengeInd { + Single(String), + Multiple(Vec), +} + #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct AuthenticationResponse {