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
fix(authentication): fixed challenge Vs frictionless authentication flow type mismatch (#13403)
Sahkal Poddard5188edcae1d
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.jsonindex 9ddac0017e..91fdd892f8 100644--- a/api-reference/v1/openapi_spec_v1.json+++ b/api-reference/v1/openapi_spec_v1.json@@ -21736,6 +21736,16 @@"type": "string","description": "Error Message","nullable": true+ },+ "challenge_cancel_code": {+ "type": "string",+ "description": "Challenge Cancel Code",+ "nullable": true+ },+ "trans_status_reason": {+ "type": "string",+ "description": "Trans Status Reason Code",+ "nullable": true}}},diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.jsonindex 49520d20de..142190caa7 100644--- a/api-reference/v2/openapi_spec_v2.json+++ b/api-reference/v2/openapi_spec_v2.json@@ -14602,6 +14602,16 @@"type": "string","description": "Error Message","nullable": true+ },+ "challenge_cancel_code": {+ "type": "string",+ "description": "Challenge Cancel Code",+ "nullable": true+ },+ "trans_status_reason": {+ "type": "string",+ "description": "Trans Status Reason Code",+ "nullable": true}}},diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rsindex 994f797656..edd9a72c89 100644--- a/crates/api_models/src/payments.rs+++ b/crates/api_models/src/payments.rs@@ -8818,6 +8818,10 @@ pub struct ExternalAuthenticationDetailsResponse {/// Error Message#[smithy(value_type = "Option<String>")]pub error_message: Option<String>,+ /// Challenge Cancel Code+ pub challenge_cancel_code: Option<String>,+ /// Trans Status Reason Code+ pub trans_status_reason: Option<String>,}#[cfg(feature = "v1")]diff --git a/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs b/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rsindex 07b956df8a..887f3d8971 100644--- a/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs@@ -148,8 +148,9 @@ impl) -> Result<Self, Self::Error> {let response = match item.response {NetceteraAuthenticationResponse::Success(response) => {- let authn_flow_type = match response.acs_challenge_mandated {- Some(ACSChallengeMandatedIndicator::Y) => {+ let authn_flow_type = match &response.trans_status {+ common_enums::TransactionStatus::ChallengeRequired+ | common_enums::TransactionStatus::ChallengeRequiredDecoupledAuthentication => {AuthNFlowType::Challenge(Box::new(ChallengeParams {acs_url: response.authentication_response.acs_url.clone(),challenge_request: response.encoded_challenge_request,@@ -162,7 +163,7 @@ implchallenge_request_key: None,}))}- Some(ACSChallengeMandatedIndicator::N) | None => AuthNFlowType::Frictionless,+ _ => AuthNFlowType::Frictionless,};let challenge_code = responsediff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rsindex 21d390e5e8..365b63c327 100644--- a/crates/router/src/types/transformers.rs+++ b/crates/router/src/types/transformers.rs@@ -788,6 +788,8 @@ implversion,error_code: authn_data.error_code.clone(),error_message: authn_data.error_message.clone(),+ challenge_cancel_code: authn_data.challenge_cancel.clone(),+ trans_status_reason: authn_data.challenge_code_reason.clone(),}}}