Skip to content

Commit

Permalink
chore: Resolved PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Debarshi Gupta authored and Debarshi Gupta committed Dec 18, 2024
1 parent e49115d commit 2b61a02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
))
} else if !req.is_three_ds() && req.request.is_card() {
Err(errors::ConnectorError::NotSupported {
message: "No three ds for credit card transactions".to_owned(),
message: "Non-ThreeDs".to_owned(),
connector: "deutschebank",
}
.into())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl TryFrom<&DeutschebankRouterData<&PaymentsAuthorizeRouterData>>
PaymentMethodData::Card(ccard) => {
if !item.router_data.clone().is_three_ds() {
Err(errors::ConnectorError::NotSupported {
message: "No three ds for credit card transactions".to_owned(),
message: "Non-ThreeDs".to_owned(),
connector: "deutschebank",
}
.into())
Expand Down Expand Up @@ -376,9 +376,13 @@ impl
DeutschebankThreeDSInitializeResponseOutcome::Processed => {
match item.response.processed {
Some(processed) => Ok(Self {
status: match item.data.request.is_auto_capture()? {
true => common_enums::AttemptStatus::Charged,
false => common_enums::AttemptStatus::Authorized,
status: if is_response_success(&processed.rc) {
match item.data.request.is_auto_capture()? {
true => common_enums::AttemptStatus::Charged,
false => common_enums::AttemptStatus::Authorized,
}
} else {
common_enums::AttemptStatus::AuthenticationFailed
},
response: Ok(PaymentsResponseData::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(
Expand All @@ -395,7 +399,7 @@ impl
..item.data
}),
None => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from("processed".to_owned()),
bytes::Bytes::from("missing processed".to_owned()),
)
.into()),
}
Expand All @@ -422,7 +426,7 @@ impl
..item.data
}),
None => Err(errors::ConnectorError::UnexpectedResponseError(
bytes::Bytes::from("challenge_required".to_owned()),
bytes::Bytes::from("missing challenge_required".to_owned()),
)
.into()),
}
Expand Down

0 comments on commit 2b61a02

Please sign in to comment.