Skip to content

Commit

Permalink
add directoryServerId in complete request
Browse files Browse the repository at this point in the history
  • Loading branch information
prasunna09 committed Feb 5, 2024
1 parent e2e4626 commit f48c0df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
17 changes: 5 additions & 12 deletions crates/router/src/connector/nmi/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,8 @@ pub struct NmiCompleteRequest {
cavv: Option<String>,
xid: Option<String>,
eci: Option<String>,
three_ds_version: Option<ThreeDsVersion>,
}

#[derive(Debug, Serialize, Deserialize)]
pub enum ThreeDsVersion {
#[serde(rename = "2.0.0")]
VersionTwo,
#[serde(rename = "2.1.0")]
VersionTwoPointOne,
#[serde(rename = "2.2.0")]
VersionTwoPointTwo,
three_ds_version: Option<String>,
directory_server_id: Option<String>,
}

#[derive(Debug, Deserialize)]
Expand All @@ -267,8 +258,9 @@ pub struct NmiRedirectResponseData {
xid: Option<String>,
eci: Option<String>,
card_holder_auth: Option<String>,
three_ds_version: Option<ThreeDsVersion>,
three_ds_version: Option<String>,
order_id: Option<String>,
directory_server_id: Option<String>,
}

impl TryFrom<&NmiRouterData<&types::PaymentsCompleteAuthorizeRouterData>> for NmiCompleteRequest {
Expand Down Expand Up @@ -308,6 +300,7 @@ impl TryFrom<&NmiRouterData<&types::PaymentsCompleteAuthorizeRouterData>> for Nm
xid: three_ds_data.xid,
eci: three_ds_data.eci,
three_ds_version: three_ds_data.three_ds_version,
directory_server_id: three_ds_data.directory_server_id,
})
}
}
Expand Down
6 changes: 6 additions & 0 deletions crates/router/src/services/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,12 @@ pub fn build_redirection_form(
item6.value=e.eci;
responseForm.appendChild(item6);
var item7=document.createElement('input');
item7.type='hidden';
item7.name='directoryServerId';
item7.value=e.directoryServerId;
responseForm.appendChild(item7);
var item3=document.createElement('input');
item3.type='hidden';
item3.name='cardHolderAuth';
Expand Down

0 comments on commit f48c0df

Please sign in to comment.