Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(auth_type): updated auth type in `update tracker` and also changed the default flow to `non-3ds` from `3ds` (#1424)

Amisha Prabhat1616051145c1
diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs
index 16f809f871..c0223d3c0c 100644
--- a/crates/api_models/src/enums.rs
+++ b/crates/api_models/src/enums.rs
@@ -61,9 +61,9 @@ pub enum AttemptStatus {
#[strum(serialize_all = "snake_case")]
pub enum AuthenticationType {
/// If the card is enrolled for 3DS authentication, the 3DS based authentication will be activated. The liability of chargeback shift to the issuer
- #[default]
ThreeDs,
/// 3DS based authentication will not be activated. The liability of chargeback stays with the merchant.
+ #[default]
NoThreeDs,
}
diff --git a/crates/router/src/core/payments/operations/payment_confirm.rs b/crates/router/src/core/payments/operations/payment_confirm.rs
index 62a93c1ad4..b136610f72 100644
--- a/crates/router/src/core/payments/operations/payment_confirm.rs
+++ b/crates/router/src/core/payments/operations/payment_confirm.rs
@@ -376,7 +376,7 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for Paymen
.attach_printable("Failed to encode additional pm data")?;
let business_sub_label = payment_data.payment_attempt.business_sub_label.clone();
-
+ let authentication_type = payment_data.payment_attempt.authentication_type;
payment_data.payment_attempt = db
.update_payment_attempt_with_attempt_id(
payment_data.payment_attempt,
@@ -385,7 +385,7 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for Paymen
currency: payment_data.currency,
status: attempt_status,
payment_method,
- authentication_type: None,
+ authentication_type,
browser_info,
connector,
payment_token,
diff --git a/crates/storage_models/src/enums.rs b/crates/storage_models/src/enums.rs
index 356c6ee293..6a5815ab6a 100644
--- a/crates/storage_models/src/enums.rs
+++ b/crates/storage_models/src/enums.rs
@@ -80,8 +80,8 @@ pub enum AttemptStatus {
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
pub enum AuthenticationType {
- #[default]
ThreeDs,
+ #[default]
NoThreeDs,
}