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

This commit is contained in:
Amisha Prabhat
2023-06-16 14:21:27 +05:30
committed by GitHub
parent 3645c49b38
commit 1616051145
3 changed files with 4 additions and 4 deletions

View File

@ -61,9 +61,9 @@ pub enum AttemptStatus {
#[strum(serialize_all = "snake_case")] #[strum(serialize_all = "snake_case")]
pub enum AuthenticationType { 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 /// 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, ThreeDs,
/// 3DS based authentication will not be activated. The liability of chargeback stays with the merchant. /// 3DS based authentication will not be activated. The liability of chargeback stays with the merchant.
#[default]
NoThreeDs, NoThreeDs,
} }

View File

@ -376,7 +376,7 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for Paymen
.attach_printable("Failed to encode additional pm data")?; .attach_printable("Failed to encode additional pm data")?;
let business_sub_label = payment_data.payment_attempt.business_sub_label.clone(); 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 payment_data.payment_attempt = db
.update_payment_attempt_with_attempt_id( .update_payment_attempt_with_attempt_id(
payment_data.payment_attempt, payment_data.payment_attempt,
@ -385,7 +385,7 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for Paymen
currency: payment_data.currency, currency: payment_data.currency,
status: attempt_status, status: attempt_status,
payment_method, payment_method,
authentication_type: None, authentication_type,
browser_info, browser_info,
connector, connector,
payment_token, payment_token,

View File

@ -80,8 +80,8 @@ pub enum AttemptStatus {
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")] #[strum(serialize_all = "snake_case")]
pub enum AuthenticationType { pub enum AuthenticationType {
#[default]
ThreeDs, ThreeDs,
#[default]
NoThreeDs, NoThreeDs,
} }