@@ -158,14 +158,21 @@ impl
158
158
}
159
159
Some ( ACSChallengeMandatedIndicator :: N ) | None => AuthNFlowType :: Frictionless ,
160
160
} ;
161
+
162
+ let challenge_code = response
163
+ . authentication_request
164
+ . as_ref ( )
165
+ . and_then ( |req| req. three_ds_requestor_challenge_ind . as_ref ( ) )
166
+ . and_then ( |v| v. first ( ) . cloned ( ) ) ;
167
+
161
168
Ok ( AuthenticationResponseData :: AuthNResponse {
162
169
authn_flow_type,
163
170
authentication_value : response. authentication_value ,
164
171
trans_status : response. trans_status ,
165
172
connector_metadata : None ,
166
173
ds_trans_id : response. authentication_response . ds_trans_id ,
167
174
eci : response. eci ,
168
- challenge_code : response . three_ds_requestor_challenge_ind ,
175
+ challenge_code,
169
176
challenge_cancel : response. challenge_cancel ,
170
177
challenge_code_reason : response. trans_status_reason ,
171
178
message_extension : response. message_extension . and_then ( |v| {
@@ -653,13 +660,12 @@ pub struct NetceteraAuthenticationSuccessResponse {
653
660
pub authentication_value : Option < Secret < String > > ,
654
661
pub eci : Option < String > ,
655
662
pub acs_challenge_mandated : Option < ACSChallengeMandatedIndicator > ,
663
+ pub authentication_request : Option < AuthenticationRequest > ,
656
664
pub authentication_response : AuthenticationResponse ,
657
665
#[ serde( rename = "base64EncodedChallengeRequest" ) ]
658
666
pub encoded_challenge_request : Option < String > ,
659
667
pub challenge_cancel : Option < String > ,
660
668
pub trans_status_reason : Option < String > ,
661
- #[ serde( rename = "threeDSRequestorChallengeInd" ) ]
662
- pub three_ds_requestor_challenge_ind : Option < String > ,
663
669
pub message_extension : Option < Vec < MessageExtensionAttribute > > ,
664
670
}
665
671
@@ -669,6 +675,13 @@ pub struct NetceteraAuthenticationFailureResponse {
669
675
pub error_details : NetceteraErrorDetails ,
670
676
}
671
677
678
+ #[ derive( Debug , Deserialize , Serialize ) ]
679
+ #[ serde( rename_all = "camelCase" ) ]
680
+ pub struct AuthenticationRequest {
681
+ #[ serde( rename = "threeDSRequestorChallengeInd" ) ]
682
+ pub three_ds_requestor_challenge_ind : Option < Vec < String > > ,
683
+ }
684
+
672
685
#[ derive( Debug , Deserialize , Serialize ) ]
673
686
#[ serde( rename_all = "camelCase" ) ]
674
687
pub struct AuthenticationResponse {
0 commit comments