mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
feat(core): Add service details field in authentication table (#6757)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -219,6 +219,7 @@ pub async fn create_new_authentication(
|
||||
ds_trans_id: None,
|
||||
directory_server_id: None,
|
||||
acquirer_country_code: None,
|
||||
service_details: None,
|
||||
};
|
||||
state
|
||||
.store
|
||||
|
||||
@ -4262,6 +4262,7 @@ where
|
||||
pub poll_config: Option<router_types::PollConfig>,
|
||||
pub tax_data: Option<TaxData>,
|
||||
pub session_id: Option<String>,
|
||||
pub service_details: Option<api_models::payments::CtpServiceDetails>,
|
||||
}
|
||||
|
||||
#[derive(Clone, serde::Serialize, Debug)]
|
||||
|
||||
@ -194,6 +194,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsCaptureR
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -205,6 +205,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsCancelRe
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -254,6 +254,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, payments::PaymentData<F>, api::Paymen
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -348,6 +348,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let customer_details = Some(CustomerDetails {
|
||||
|
||||
@ -818,6 +818,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -613,6 +613,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -165,6 +165,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsPostSess
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
operation: Box::new(self),
|
||||
|
||||
@ -192,6 +192,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, PaymentsCancelRequest
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -212,6 +212,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsSessionR
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -199,6 +199,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsStartReq
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -508,6 +508,7 @@ async fn get_tracker_for_sync<
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -490,6 +490,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -171,6 +171,7 @@ impl<F: Send + Clone + Sync>
|
||||
poll_config: None,
|
||||
tax_data: None,
|
||||
session_id: None,
|
||||
service_details: None,
|
||||
};
|
||||
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
|
||||
@ -179,6 +179,7 @@ impl<F: Send + Clone + Sync>
|
||||
poll_config: None,
|
||||
tax_data: Some(tax_data),
|
||||
session_id: request.session_id.clone(),
|
||||
service_details: None,
|
||||
};
|
||||
let get_trackers_response = operations::GetTrackerResponse {
|
||||
operation: Box::new(self),
|
||||
|
||||
@ -173,6 +173,7 @@ pub async fn create_new_authentication(
|
||||
ds_trans_id: None,
|
||||
directory_server_id: None,
|
||||
acquirer_country_code: None,
|
||||
service_details: None,
|
||||
};
|
||||
state
|
||||
.store
|
||||
|
||||
@ -2,7 +2,7 @@ use error_stack::Report;
|
||||
use hyperswitch_domain_models::{
|
||||
errors::api_error_response::ApiErrorResponse,
|
||||
router_request_types::unified_authentication_service::{
|
||||
ServiceDetails, ServiceSessionIds, TransactionDetails, UasPreAuthenticationRequestData,
|
||||
CtpServiceDetails, ServiceSessionIds, TransactionDetails, UasPreAuthenticationRequestData,
|
||||
},
|
||||
};
|
||||
|
||||
@ -12,7 +12,7 @@ use crate::core::payments::PaymentData;
|
||||
impl<F: Clone + Sync> TryFrom<PaymentData<F>> for UasPreAuthenticationRequestData {
|
||||
type Error = Report<ApiErrorResponse>;
|
||||
fn try_from(payment_data: PaymentData<F>) -> Result<Self, Self::Error> {
|
||||
let service_details = ServiceDetails {
|
||||
let service_details = CtpServiceDetails {
|
||||
service_session_ids: Some(ServiceSessionIds {
|
||||
merchant_transaction_id: None,
|
||||
correlation_id: None,
|
||||
|
||||
@ -150,6 +150,7 @@ impl AuthenticationInterface for MockDb {
|
||||
ds_trans_id: authentication.ds_trans_id,
|
||||
directory_server_id: authentication.directory_server_id,
|
||||
acquirer_country_code: authentication.acquirer_country_code,
|
||||
service_details: authentication.service_details,
|
||||
};
|
||||
authentications.push(authentication.clone());
|
||||
Ok(authentication)
|
||||
|
||||
Reference in New Issue
Block a user