feat(router): send message_version and directory_server_id in next_action block of three_ds_data for external 3ds flow (#4715)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2024-05-23 12:42:14 +05:30
committed by GitHub
parent da2dc10f3d
commit 13f6efc7e8
12 changed files with 40 additions and 0 deletions

View File

@ -42,6 +42,7 @@ pub struct Authentication {
pub profile_id: String,
pub payment_id: Option<String>,
pub merchant_connector_id: String,
pub directory_server_id: Option<String>,
}
impl Authentication {
@ -86,6 +87,7 @@ pub struct AuthenticationNew {
pub profile_id: String,
pub payment_id: Option<String>,
pub merchant_connector_id: String,
pub directory_server_id: Option<String>,
}
#[derive(Debug)]
@ -101,6 +103,7 @@ pub enum AuthenticationUpdate {
authentication_status: common_enums::AuthenticationStatus,
acquirer_bin: Option<String>,
acquirer_merchant_id: Option<String>,
directory_server_id: Option<String>,
},
AuthenticationUpdate {
authentication_value: Option<String>,
@ -159,6 +162,7 @@ pub struct AuthenticationUpdateInternal {
pub acs_reference_number: Option<String>,
pub acs_trans_id: Option<String>,
pub acs_signed_content: Option<String>,
pub directory_server_id: Option<String>,
}
impl Default for AuthenticationUpdateInternal {
@ -189,6 +193,7 @@ impl Default for AuthenticationUpdateInternal {
acs_reference_number: Default::default(),
acs_trans_id: Default::default(),
acs_signed_content: Default::default(),
directory_server_id: Default::default(),
}
}
}
@ -221,6 +226,7 @@ impl AuthenticationUpdateInternal {
acs_reference_number,
acs_trans_id,
acs_signed_content,
directory_server_id,
} = self;
Authentication {
connector_authentication_id: connector_authentication_id
@ -252,6 +258,7 @@ impl AuthenticationUpdateInternal {
acs_reference_number: acs_reference_number.or(source.acs_reference_number),
acs_trans_id: acs_trans_id.or(source.acs_trans_id),
acs_signed_content: acs_signed_content.or(source.acs_signed_content),
directory_server_id: directory_server_id.or(source.directory_server_id),
..source
}
}
@ -304,6 +311,7 @@ impl From<AuthenticationUpdate> for AuthenticationUpdateInternal {
authentication_status,
acquirer_bin,
acquirer_merchant_id,
directory_server_id,
} => Self {
threeds_server_transaction_id: Some(threeds_server_transaction_id),
maximum_supported_version: Some(maximum_supported_3ds_version),
@ -315,6 +323,7 @@ impl From<AuthenticationUpdate> for AuthenticationUpdateInternal {
authentication_status: Some(authentication_status),
acquirer_bin,
acquirer_merchant_id,
directory_server_id,
..Default::default()
},
AuthenticationUpdate::AuthenticationUpdate {