mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(connector): [Netcetera] add sca exemption (#6611)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -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")]
|
||||
|
||||
@ -456,18 +456,8 @@ impl TryFrom<&NetceteraRouterData<&types::authentication::ConnectorAuthenticatio
|
||||
let 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,
|
||||
|
||||
Reference in New Issue
Block a user