Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(connector): [Netcetera] add sca exemption (#6611)
Sakil Mostak31204941ee24
diff --git a/crates/router/src/connector/netcetera/netcetera_types.rs b/crates/router/src/connector/netcetera/netcetera_types.rsindex 2718fb3b23..68a01b26fb 100644--- a/crates/router/src/connector/netcetera/netcetera_types.rs+++ b/crates/router/src/connector/netcetera/netcetera_types.rs@@ -1391,6 +1391,32 @@ impl From<crate::types::BrowserInformation> for Browser {}}+impl From<Option<common_enums::ScaExemptionType>> for ThreeDSRequestor {+ fn from(value: Option<common_enums::ScaExemptionType>) -> Self {+ // if sca exemption is provided, we need to set the challenge indicator to NoChallengeRequestedTransactionalRiskAnalysis+ let three_ds_requestor_challenge_ind =+ if let Some(common_enums::ScaExemptionType::TransactionRiskAnalysis) = value {+ Some(SingleOrListElement::Single(+ ThreeDSRequestorChallengeIndicator::NoChallengeRequestedTransactionalRiskAnalysis,+ ))+ } else {+ None+ };++ Self {+ three_ds_requestor_authentication_ind: ThreeDSRequestorAuthenticationIndicator::Payment,+ three_ds_requestor_authentication_info: None,+ three_ds_requestor_challenge_ind,+ three_ds_requestor_prior_authentication_info: None,+ three_ds_requestor_dec_req_ind: None,+ three_ds_requestor_dec_max_time: None,+ app_ip: None,+ three_ds_requestor_spc_support: None,+ spc_incomp_ind: None,+ }+ }+}+#[derive(Serialize, Deserialize, Debug, Clone)]pub enum ChallengeWindowSizeEnum {#[serde(rename = "01")]diff --git a/crates/router/src/connector/netcetera/transformers.rs b/crates/router/src/connector/netcetera/transformers.rsindex adcfb17f14..ab228d95a9 100644--- a/crates/router/src/connector/netcetera/transformers.rs+++ b/crates/router/src/connector/netcetera/transformers.rs@@ -456,18 +456,8 @@ impl TryFrom<&NetceteraRouterData<&types::authentication::ConnectorAuthenticatiolet now = common_utils::date_time::now();let request = item.router_data.request.clone();let pre_authn_data = request.pre_authentication_data.clone();- let three_ds_requestor = netcetera_types::ThreeDSRequestor {- three_ds_requestor_authentication_ind:- netcetera_types::ThreeDSRequestorAuthenticationIndicator::Payment,- three_ds_requestor_authentication_info: None,- three_ds_requestor_challenge_ind: None,- three_ds_requestor_prior_authentication_info: None,- three_ds_requestor_dec_req_ind: None,- three_ds_requestor_dec_max_time: None,- app_ip: None,- three_ds_requestor_spc_support: None,- spc_incomp_ind: None,- };+ let three_ds_requestor =+ netcetera_types::ThreeDSRequestor::from(item.router_data.psd2_sca_exemption_type);let card = utils::get_card_details(request.payment_method_data, "netcetera")?;let cardholder_account = netcetera_types::CardholderAccount {acct_type: None,