text
stringlengths
70
351k
source
stringclasses
4 values
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router storage_scheme: MerchantStorageScheme, ) -> errors::CustomResult<(), errors::VaultError> { let pm_update = payment_method::PaymentMethodUpdate::MetadataUpdateAndLastUsed { metadata: pm_metadata, l...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router }); stored_card_resp } else { Err::<T, error_stack::Report<errors::VaultError>>((errors::VaultError::ApiError).into()) .attach_printable_lazy(|| format!("Locker error respo...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router ); }) }, &metrics::CARD_DELETE_TIME, &[], ) .await .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Failed whil...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router || card_updation_obj .nick_name .map(|nick_name| nick_name.expose()) .is_some_and(|new_nick_name| { existing_card_data .nick_name ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router card.card_network .map(|card_network| card_network.to_string()) }), network_token_requestor_reference_id, network_token_locker_id, network_token_payment_method_...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router use std::{ collections::{HashMap, HashSet}, fmt::Debug, str::FromStr, }; pub fn get_card_bin_and_last4_digits_for_masked_card( masked_card_number: &str, ) -> Result<(String, String), cards::CardNumberVali...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router logger::debug!("Network token added to locker failed {:?}", err); Ok(false) } } } // need to discuss regarding the migration APIs for v2 #[cfg(all( feature = "v2", feature = "...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router Ok(services::ApplicationResponse::Json( api::PaymentMethodMigrateResponse { payment_method_response, card_migrated: migrate_status.card_migrated, network_token_migrated: mi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router .await } else { Err(err) .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Error while finding payment m...
ast_fragments
// file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router created: Some(common_utils::date_time::now()), recurring_enabled: false, //[#219] installment_payment_enabled: false, //[#219] payment_experience: Some(vec![api_models::enums::PaymentExperience...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router created: Some(pm.created_at), recurring_enabled: false, installment_payment_enabled: false, payment_experience: Some(vec![api_models::enums::PaymentExperience::RedirectToUr...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router payment_method: pm, connector_details: connector_details.clone(), }; Ok(Some(token_data)) } }, None => Ok(None), } ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router &mut response, )) .await?; Ok(services::ApplicationResponse::Json(response)) } #[cfg(all( any(feature = "v2", feature = "v1"), not(feature = "payment_methods_v2"), not(feature = "custome...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router Ok(services::api::ApplicationResponse::Json( api::PaymentMethodResponse::foreign_from((None, res)), )) } } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router } Ok(services::api::ApplicationResponse::Json( api::PaymentMethodResponse::foreign_from((Some(card), response)), )) } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_me...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router saved_to_locker: false, }) } } } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_methods_v2"), not(feature = "customer_v2") ))] #[allow(clippy::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router _resp: &mut api::PaymentMethodResponse, _merchant_account: &domain::MerchantAccount, _customer_id: &id_type::CustomerId, _key_store: &domain::MerchantKeyStore, ) -> errors::RouterResult<domain::PaymentMet...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router use crate::{ core::payment_methods as pm_core, headers, types::payment_methods as pm_types, utils::ConnectorResponseExt, }; #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_methods_...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router }; Ok(services::ApplicationResponse::Json(response)) } } } } #[cfg(all( any(feature = "v2", feature = "v1"), not(feature = "payment_methods_v2"), not(f...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router .await .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound) .attach_printable("Failed to update surcharge_applicable in Payment Intent"); } Ok(()) } #[cfg(all( ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router fn get_val(str: String, val: &serde_json::Value) -> Option<String> { str.split('.') .try_fold(val, |acc, x| acc.get(x)) .and_then(|v| v.as_str()) .map(|s| s.to_string()) } #[cfg(all( any(...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router network_transaction_id: Option<String>, storage_scheme: MerchantStorageScheme, payment_method_billing_address: Option<Encryption>, ) -> errors::RouterResult<domain::PaymentMethod> { todo!() } #[cfg(all( ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router resp.client_secret = pm.client_secret; } } Ok(services::ApplicationResponse::Json(resp)) } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_methods_v2") ))] #[i...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router return Err(e.attach_printable("Failed to add card to locker")); } } } } } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_method...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/cards.rs | crate: router let expired = current_timestamp > session_expiry; Ok(expired) } } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_methods_v2"), not(feature = "customer_v2") ))] #[...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router // Ok(surcharge_metadata) // } #[cfg(feature = "v2")] fn get_surcharge_details_from_surcharge_output( _surcharge_details: surcharge_decision_configs::SurchargeDetailsOutput, _payment_att...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router None, ), ), )?; } Ok(surcharge_metadata) } #[cfg(all( any(feature = "v1", feature = "v2"), not(feature = "payment_methods_v2")...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use euclid...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use euclid...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/surcharge_decision_configs.rs | crate: router use api_models::{ payment_methods::SurchargeDetailsResponse, payments, routing, surcharge_decision_configs::{self, SurchargeDecisionConfigs, SurchargeDecisionManagerRecord}, }; use common...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use error_stack::ResultExt; use hy...
ast_fragments
// file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use hyperswitch_domain_models::payment_method_data; use crate::types::{payment_methods as pm_types, transformers}; use crate::{ configs::settings, core::errors...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use router_env::tracing_actix_web::RequestId; use crate::{ configs::settings, core::err...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use router_env::tracing_actix_web:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use router_env::tracing_actix_web:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use router_env::tracing_actix_web:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use hyperswitch_domain_models::payment_method_data; use crate::types::{payment_methods as pm_types, transformers}; use crate::{ configs::settings, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use router_env::tracing_actix_web:...
ast_fragments
// file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use josekit::jwe; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as service...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use josekit::jwe; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use josekit::jwe; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use josekit::jwe; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use hyperswitch_domain_models::payment_method_data; use crate::types::{payment_methods as pm_types, transformers}; use crate::{ configs::settings, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use hyperswitch_domain_models::payment_method_data; use crate::types::{payment_methods as pm_types, transformers}; use crate::{ configs::settings, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use hyperswitch_domain_models::payment_method_data; fn foreign_from(token: &payment_method_data::SingleUsePaymentMethodToken) -> Self { {<|fim_suffix|> ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use crate::types::{payment_methods as pm_types, transformers}; fn foreign_from(item: api_models::payment_methods::ConnectorTokenDetails) -> Self { <|fim...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pi...
ast_fragments
// file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types::{api, domain}, utils::Optio...
ast_fragments
// file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, Enc...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types::{api, domain}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use common_utils::{ ext_traits::{Encode, StringExt}, id_type, pii::Email, request::RequestContent, }; use crate::{ configs::settings...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types::{api, domain}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use josekit::jwe; use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use crate::{ configs::settings, core::errors::{self, CustomResult}, headers, pii::{prelude::*, Secret}, services::{api as services, encryption, EncryptionAlgorithm}, types::{api, domain}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/transformers.rs | crate: router use api_models::{enums as api_enums, payment_methods::Card}; use hyperswitch_domain_models::payment_method_data; use crate::types::{payment_methods as pm_types, transformers}; use crate::{ configs::settings, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use crate::{ core::{errors, pay...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use api_models::payment_methods as api_payment_methods; use cards::{CardNumber, NetworkToken}; use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::ut...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use masking::{ExposeInterface, Mask...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use api_models::payment_methods as api_payment_methods; use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use api_models::payment_methods as api_payment_methods; use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use crate::{ core::{errors, pay...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use crate::{ core::{errors, pay...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use api_models::payment_methods as api_payment_methods; use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use masking::{ExposeInterface, Mask...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use api_models::payment_methods as api_payment_methods; use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use api_models::payment_methods as api_payment_methods; use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use super::transformers::DeleteCard...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use masking::{ExposeInterface, Mask...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use josekit::jwe; use masking::{Exp...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/network_tokenization.rs | crate: router use common_utils::{ errors::CustomResult, ext_traits::{BytesExt, Encode}, id_type, metrics::utils::record_operation_time, request::RequestContent, }; use josekit::jwe; use masking::{Exp...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/validator.rs | crate: router use api_models::{admin, payment_methods::PaymentMethodCollectLinkRequest}; use common_utils::link_utils; use diesel_models::generic_link::PaymentMethodCollectLinkData; use masking::Secret; use crate::{ consts, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/validator.rs | crate: router use api_models::{admin, payment_methods::PaymentMethodCollectLinkRequest}; use diesel_models::generic_link::PaymentMethodCollectLinkData; use crate::{ consts, core::{ errors::{self, RouterResult}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/validator.rs | crate: router use api_models::{admin, payment_methods::PaymentMethodCollectLinkRequest}; use common_utils::link_utils; use diesel_models::generic_link::PaymentMethodCollectLinkData; use masking::Secret; use crate::{ consts, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use masking::PeekInterface; use rdkafka::message::ToBytes; use crate::{ core::{errors, payment_methods::cards::migrate_payment_method}, routes, services, types::{api, domain}, }; pub fn validate_card_expi...
ast_fragments
// file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use api_models::payment_methods::{PaymentMethodMigrationResponse, PaymentMethodRecord}; use rdkafka::message::ToBytes; use crate::{ core::{errors, payment_methods::cards::migrate_payment_method}, routes, services, types...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use actix_multipart::form::{bytes::Bytes, text::Text, MultipartForm}; use api_models::payment_methods::{PaymentMethodMigrationResponse, PaymentMethodRecord}; use rdkafka::message::ToBytes; use crate::{ core::{err...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use api_models::payment_methods::{PaymentMethodMigrationResponse, PaymentMethodRecord}; use rdkafka::message::ToBytes; use crate::{ core::{errors, payment_methods::cards::migrate_payment_method}, routes, serv...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router pub fn build(self) -> RecordMigrationStatus { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router pub fn network_transaction_id_migrated(&mut self, network_transaction_migrated: Option<bool>) { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router pub fn connector_mandate_details_migrated( &mut self, connector_mandate_details_migrated: Option<bool>, ) { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router pub fn network_token_migrated(&mut self, network_token_migrated: Option<bool>) { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router pub fn card_migrated(&mut self, card_migrated: bool) { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use rdkafka::message::ToBytes; use crate::{ core::{errors, payment_methods::cards::migrate_payment_method}, routes, services, types::{api, domain}, }; fn validate_card_exp_year(year: String) -> Result<(),...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use actix_multipart::form::{bytes::Bytes, text::Text, MultipartForm}; use api_models::payment_methods::{PaymentMethodMigrationResponse, PaymentMethodRecord}; use rdkafka::message::ToBytes; use crate::{ core::{err...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/migration.rs | crate: router use api_models::payment_methods::{PaymentMethodMigrationResponse, PaymentMethodRecord}; use csv::Reader; fn parse_csv(data: &[u8]) -> csv::Result<Vec<PaymentMethodRecord>> { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/vault.rs | crate: router use router_env::{instrument, tracing}; use crate::{ consts, core::errors::{self, CustomResult, RouterResult}, db, logger, routes, routes::metrics, types::{ api, domain, storage::{self,...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payment_methods/vault.rs | crate: router use scheduler::{types::process_data, utils as process_tracker_utils}; use crate::{ consts, core::errors::{self, CustomResult, RouterResult}, db, logger, routes, routes::metrics, types::{ api, ...
ast_fragments