From 1616051145c1e276fdd7d0f85cda76baaeaa0023 Mon Sep 17 00:00:00 2001 From: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com> Date: Fri, 16 Jun 2023 14:21:27 +0530 Subject: [PATCH] refactor(auth_type): updated auth type in `update tracker` and also changed the default flow to `non-3ds` from `3ds` (#1424) --- crates/api_models/src/enums.rs | 2 +- crates/router/src/core/payments/operations/payment_confirm.rs | 4 ++-- crates/storage_models/src/enums.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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 UpdateTracker, 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 UpdateTracker, 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, }