feat(router): add acquirer_country_code in acquirer_details and send it in netcetera authentication flow (#4835)

This commit is contained in:
Sai Harsha Vardhan
2024-06-06 18:52:04 +05:30
committed by GitHub
parent e7acaa5716
commit 3077421cbd
16 changed files with 47 additions and 2 deletions

View File

@ -44,6 +44,7 @@ pub struct Authentication {
pub merchant_connector_id: String,
pub ds_trans_id: Option<String>,
pub directory_server_id: Option<String>,
pub acquirer_country_code: Option<String>,
}
impl Authentication {
@ -90,6 +91,7 @@ pub struct AuthenticationNew {
pub merchant_connector_id: String,
pub ds_trans_id: Option<String>,
pub directory_server_id: Option<String>,
pub acquirer_country_code: Option<String>,
}
#[derive(Debug)]
@ -118,6 +120,7 @@ pub enum AuthenticationUpdate {
acquirer_bin: Option<String>,
acquirer_merchant_id: Option<String>,
directory_server_id: Option<String>,
acquirer_country_code: Option<String>,
},
AuthenticationUpdate {
authentication_value: Option<String>,
@ -180,6 +183,7 @@ pub struct AuthenticationUpdateInternal {
pub acs_signed_content: Option<String>,
pub ds_trans_id: Option<String>,
pub directory_server_id: Option<String>,
pub acquirer_country_code: Option<String>,
}
impl Default for AuthenticationUpdateInternal {
@ -212,6 +216,7 @@ impl Default for AuthenticationUpdateInternal {
acs_signed_content: Default::default(),
ds_trans_id: Default::default(),
directory_server_id: Default::default(),
acquirer_country_code: Default::default(),
}
}
}
@ -246,6 +251,7 @@ impl AuthenticationUpdateInternal {
acs_signed_content,
ds_trans_id,
directory_server_id,
acquirer_country_code,
} = self;
Authentication {
connector_authentication_id: connector_authentication_id
@ -279,6 +285,7 @@ impl AuthenticationUpdateInternal {
acs_signed_content: acs_signed_content.or(source.acs_signed_content),
ds_trans_id: ds_trans_id.or(source.ds_trans_id),
directory_server_id: directory_server_id.or(source.directory_server_id),
acquirer_country_code: acquirer_country_code.or(source.acquirer_country_code),
..source
}
}
@ -331,6 +338,7 @@ impl From<AuthenticationUpdate> for AuthenticationUpdateInternal {
acquirer_bin,
acquirer_merchant_id,
directory_server_id,
acquirer_country_code,
} => Self {
threeds_server_transaction_id: Some(threeds_server_transaction_id),
maximum_supported_version: Some(maximum_supported_3ds_version),
@ -343,6 +351,7 @@ impl From<AuthenticationUpdate> for AuthenticationUpdateInternal {
acquirer_bin,
acquirer_merchant_id,
directory_server_id,
acquirer_country_code,
..Default::default()
},
AuthenticationUpdate::AuthenticationUpdate {