text
stringlengths
70
351k
source
stringclasses
4 values
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use crate::types::domain::behaviour::Conversion; use crate::{ core::{ errors::{ self, ConnectorErrorExt, CustomResult, RouterResponse, RouterResult, StorageErrorExt, }, payments::{self, customer...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use crate::types::domain::behaviour::Conversion; use crate::{ core::{ errors::{ self, ConnectorErrorExt, CustomResult, RouterResponse, RouterResult, StorageErrorExt, }, payments::{self, customer...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use std::{ collections::{HashMap, HashSet}, vec::IntoIter, }; use crate::{ core::{ errors::{ self, ConnectorErrorExt, CustomResult, RouterResponse, RouterResult, StorageErrorExt, }, paym...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router { Ok(business_profile) } else { db.find_business_profile_by_profile_id(key_manager_state, merchant_key_store, profile_id) .await .to_not_found_response(errors::ApiErrorResponse::ProfileN...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use hyperswitch_domain_models::payment_methods::PaymentMethod; use crate::types::domain::behaviour::Conversion; use crate::{ core::{ errors::{ ...
ast_fragments
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{GenericLinkStatus, Ge...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{Generi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{Generi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use diesel_models::{ enums as storage_enums, generic_link::{GenericLinkNew, PayoutLink}, CommonMandateReference, PayoutsMandateReference, PayoutsMand...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{Generi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{Generi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use error_stack::{report, ResultExt}; use serde_json; use crate::types::domain::behaviour::Conversion; use crate::{ core::{ errors::{ sel...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use diesel_models::{ enums as storage_enums, generic_link::{GenericLinkNew, PayoutLink}, CommonMandateReference, PayoutsMandateReference, PayoutsMand...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use common_enums::PayoutRetryType; use retry::GsmValidation; use crate::types::domain::behaviour::Conversion; use crate::{ core::{ errors::{ self, ConnectorErrorExt, CustomResult, RouterResponse, RouterResult, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use std::{ collections::{HashMap, HashSet}, vec::IntoIter, }; use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router _profile_id: &str, _stored_payout_method_data: Option<&payouts::PayoutMethodData>, _locale: &str, _customer: Option<&domain::Customer>, _payment_method: Option<PaymentMethod>, ) -> RouterResult<PayoutData> { to...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router use api_models::payments as payment_enums; use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse}; use common_utils::{ consts, ext_traits::{AsyncExt, ValueExt}, id_type::CustomerId, link_utils::{Generi...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payouts.rs | crate: router state, merchant_account, connector_data, payout_data, key_store, )) .await .attach_printable("Creation of customer failed")?; } Ok(()) } pub ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use common_utils::fp_utils::when; use diesel_models::cards_info as card_info_models; use rdkafka::message::ToBytes; use crate::{ core::{ errors::{self, RouterResponse,...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use error_stack::{report, ResultExt}; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::car...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, route...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, route...
ast_fragments
// file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes, services...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, route...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use diesel_models::cards_info as card_info_models; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use diesel_models::cards_info as card_info_models; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes, services::ApplicationResponse, types::{ ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use diesel_models::cards_info as card_info_models; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use common_utils::fp_utils::when; use diesel_models::cards_info as card_info_models; use rdkafka::message::ToBytes; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::h...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use diesel_models::cards_info as card_info_models; use rdkafka::message::ToBytes; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use diesel_models::cards_info as card_info_models; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, route...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, route...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use actix_multipart::form::{bytes::Bytes, MultipartForm}; use api_models::cards_info as cards_info_api_types; use rdkafka::message::ToBytes; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageError...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use csv::Reader; fn parse_cards_bin_csv( data: &[u8], ) -> csv::Result<Vec<cards_info_api_types::CardInfoUpdateRequest>> { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use api_models::cards_info as cards_info_api_types; use rdkafka::message::ToBytes; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/cards_info.rs | crate: router use common_utils::fp_utils::when; use crate::{ core::{ errors::{self, RouterResponse, RouterResult, StorageErrorExt}, payments::helpers, }, db::cards_info::CardsInfoInterface, routes, services::A...
ast_fragments
// file: hyperswitch/crates/router/src/core/payout_link.rs | crate: router use api_models::payouts; use super::errors::{RouterResponse, StorageErrorExt}; use crate::{ configs::settings::{PaymentMethodFilterKey, PaymentMethodFilters}, core::payouts::{helpers as payout_helpers, validator}, errors, routes:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payout_link.rs | crate: router use api_models::payouts; use super::errors::{RouterResponse, StorageErrorExt}; use crate::{ configs::settings::{PaymentMethodFilterKey, PaymentMethodFilters}, core::payouts::{helpers as payout_helpers, validator}, erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payout_link.rs | crate: router use actix_web::http::header; use api_models::payouts; use super::errors::{RouterResponse, StorageErrorExt}; use crate::{ configs::settings::{PaymentMethodFilterKey, PaymentMethodFilters}, core::payouts::{helpers as payout_...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payout_link.rs | crate: router use std::{ cmp::Ordering, collections::{HashMap, HashSet}, }; use actix_web::http::header; use api_models::payouts; use common_utils::{ ext_traits::{AsyncExt, Encode, OptionExt}, link_utils, types::{AmountConve...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payout_link.rs | crate: router use std::{ cmp::Ordering, collections::{HashMap, HashSet}, }; use actix_web::http::header; use api_models::payouts; use common_utils::{ ext_traits::{AsyncExt, Encode, OptionExt}, link_utils, types::{AmountConve...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router acs_reference_number: authentication_response.acs_reference_number, acs_trans_id: authentication_response.acs_trans_id, three_dsserver_trans_id: authentication_response.three_dsserver_trans_id, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router business_profile: &domain::Profile, key_store: &domain::MerchantKeyStore, transaction_data: &payouts::PayoutData, routing_data: &mut storage::RoutingData, eligible_connectors: Option<Vec<enums::RoutableConnectors>...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router let final_list = connectors.filter_and_validate_for_session_flow(&result)?; Ok(final_list) } pub struct SessionTokenRoutingResult { pub final_result: api::SessionConnectorDatas, pub routing_result: FxHashMa...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router is_connector_agnostic_mit_enabled == Some(true) && payment_method_info.get_payment_method_type() == Some(storage_enums::PaymentMethod::Card) && ntid_supported_connectors.contains(&connector) && payment_met...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router pub fn filter_network_tokenization_supported_connectors( connectors: Vec<api::ConnectorData>, network_tokenization_supported_connectors: &HashSet<enums::Connector>, ) -> Vec<api::ConnectorData> { connectors .into...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router }); // Set the card details received in the recurring details within the payment method data. payment_data.set_payment_method_data(Some( hyperswitch_domain_models::payment_method_data::PaymentMethodData::CardDeta...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router .first() .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration) .attach_printable( "No eligible connector found for the network transaction id based mit flow", )?; Ok(( ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router } else if let api::ConnectorChoice::StraightThrough(algorithm) = connector_choice { update_straight_through_routing(payment_data, algorithm) .change_context(errors::ApiErrorResponse::InternalServerError) ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router let _: api_models::routing::RoutingAlgorithm = request_straight_through .clone() .parse_value("RoutingAlgorithm") .attach_printable("Invalid straight through routing rules format")?; payment_data.set_...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router for status in enums::IntentStatus::iter() { status_map.entry(status).or_default(); } Ok(services::ApplicationResponse::Json( api::PaymentsAggregateResponse { status_with_count: status_map, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router total_count, data, }, )) }, &metrics::PAYMENT_LIST_LATENCY, router_env::metric_attributes!(("merchant_id", merchant.get_id().clone())), )...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router total_count, data, }, )) }, &metrics::PAYMENT_LIST_LATENCY, router_env::metric_attributes!(("merchant_id", merchant.get_id().clone())), )...
ast_fragments
// file: hyperswitch/crates/router/src/core/payments.rs | crate: router .map(ForeignFrom::foreign_from) .collect(); Ok(services::ApplicationResponse::Json( api::PaymentListResponse { size: data.len(), data, }, )) } #[cfg(all(feature = "v2", feature = "ol...
ast_fragments
// file: hyperswitch/crates/router/src/core/payments.rs | crate: router } } pub fn is_operation_confirm<Op: Debug>(operation: &Op) -> bool { matches!(format!("{operation:?}").as_str(), "PaymentConfirm") } pub fn is_operation_complete_authorize<Op: Debug>(operation: &Op) -> bool { matches!(format!("{operat...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router &'a PaymentConfirm: Operation<F, R, Data = PaymentData<F>>, Op: Operation<F, R, Data = PaymentData<F>> + Send + Sync, &'a Op: Operation<F, R, Data = PaymentData<F>>, { if confirm.unwrap_or(false) { Box::new(&P...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router merchant_key_store: &domain::MerchantKeyStore, customer: &Option<domain::Customer>, business_profile: &domain::Profile, ) -> RouterResult<D> where F: Send + Clone, D: OperationSessionGetters<F> + OperationSessionS...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router domain::ApplePayFlow::Manual } } }, api_models::payments::ApplepaySessionTokenMetadata::ApplePay(_) => { doma...
ast_fragments
// file: hyperswitch/crates/router/src/core/payments.rs | crate: router state: &SessionState, payment_method_type: Option<enums::PaymentMethodType>, merchant_connector_account: Option<&helpers::MerchantConnectorAccountType>, ) -> Option<domain::ApplePayFlow> { payment_method_type.and_then(|pmt| match pm...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router use api_models::{ self, enums, mandates::RecurringDetails, payments::{self as payments_api}, }; pub use common_enums::enums::CallConnectorAction; use crate::{ configs::settings::{ApplePayPreDecryptFlow, PaymentMethodT...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router } } _ => Ok(router_data), } } pub fn is_preprocessing_required_for_wallets(connector_name: String) -> bool { connector_name == *"trustpay" || connector_name == *"payme" } #[cfg(feature = "v1")] #...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router (router_data, !is_error_in_response) } else { (router_data, should_continue_payment) } } }; Ok(router_data_and_should_continue_payment) } #[cfg(feature = "v1")...
ast_fragments
// file: hyperswitch/crates/router/src/core/payments.rs | crate: router } } let call_connectors_end_time = Instant::now(); let call_connectors_duration = call_connectors_end_time.saturating_duration_since(call_connectors_start_time); tracing::info!(duration = format!("Duration taken: {}...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router use redis_interface::errors::RedisError; use self::{ conditional_configs::perform_decision_management, flows::{ConstructFlowSpecificData, Feature}, operations::{BoxedOperation, Operation, PaymentResponse}, routing::{s...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router Ok(None) } token_action => { logger::info!( "Invalid tokenization action found for decryption flow: {:?}", token_action ); Ok(None) ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router .store .find_business_profile_by_profile_id(key_manager_state, &merchant_key_store, profile_id) .await .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound { ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router payment_sync_request, get_tracker_response, call_connector_action, HeaderPayload::default(), )) .await?; Ok(router_types::RedirectPaymen...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router } } #[derive(Clone, Debug)] pub struct PaymentRedirectSync; #[cfg(feature = "v1")] #[async_trait::async_trait] impl PaymentRedirectFlow for PaymentRedirectSync { type PaymentFlowResponse = router_types::RedirectPaymentFlowR...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router flow_type, connector.clone(), resource_id.clone(), platform_merchant_account, ) .await?; self.generate_response(&payment_flow_response, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router payment_flow_response: &Self::PaymentFlowResponse, payment_id: id_type::PaymentId, connector: String, ) -> RouterResult<services::ApplicationResponse<api::RedirectionResponse>>; #[cfg(feature = "v2")]...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router payment_id, header_payload, ) .await?; logger::info!(?confirm_intent_response); Ok(confirm_intent_response) } #[cfg(feature = "v2")] #[allow(clippy::too_many_arguments)] async fn decide_authorize_or...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router payment_data.generate_response( &state, connector_http_status_code, external_latency, header_payload.x_hs_latency, &merchant_account, &profile, ) } #[allow(clippy::too_many_arg...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router &state.base_url, operation, &state.conf.connector_request_reference_id_config, None, None, header_payload.x_hs_latency, &merchant_account, ) } #[cfg(feature = "v2")] #[allo...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router payment_data, &state, None, None, header_payload.x_hs_latency, &merchant_account, &profile, ) } #[cfg(feature = "v2")] #[allow(clippy::too_many_arguments)] pub async fn pay...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router payment_data.generate_response( &state, connector_http_status_code, external_latency, header_payload.x_hs_latency, &merchant_account, &profile, ) } #[cfg(feature = "v2")] #[all...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router auth_flow, &state.base_url, operation, &state.conf.connector_request_reference_id_config, connector_http_status_code, external_latency, header_payload.x_hs_latency, ) } #[c...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router auth_flow, &state.base_url, operation, &state.conf.connector_request_reference_id_config, connector_http_status_code, external_latency, header_payload.x_hs_latency, ) } #[c...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router .attach_printable("error performing surcharge decision operation")?; Ok(if surcharge_results.is_empty_result() { None } else { Some(api::SessionSurchargeDetails::Calculated(surchar...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router _merchant_account: &domain::MerchantAccount, _business_profile: &domain::Profile, _payment_attempt: &storage::PaymentAttempt, _payment_intent: &storage::PaymentIntent, _billing_address: Option<hyperswitch_domain_m...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router async fn populate_surcharge_details<F>( state: &SessionState, payment_data: &mut PaymentData<F>, ) -> RouterResult<()> where F: Send + Clone, { todo!() } #[cfg(feature = "v1")] #[instrument(skip_all)] async fn popula...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router None, &key_store, None, header_payload, ) .await?; Ok((payment_data, req, customer)) } #[instrument(skip_all)] #[cfg(feature = "v1")] pub async fn call_decision_ma...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router } ConnectorCallType::Retryable(vec) => todo!(), ConnectorCallType::SessionMultiple(vec) => todo!(), ConnectorCallType::Skip => payment_data, }; Ok((payment_data, req, None, None)) } #[cfg(fea...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) { todo!() } fn set_setup_future_usage_in_payment_intent( &mut self, setup_future_usage: storage_enums::FutureUsage, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_surcharge_details(&mut self, surcharge_details: Option<types::SurchargeDetails>) { self.surcharge_details = surcharge_details; } fn set_merchant_connector_id_in_attempt( &mut self, merchant...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_mandate_id(&mut self, _mandate_id: api_models::payments::MandateIds) { todo!() } fn set_setup_future_usage_in_payment_intent( &mut self, setup_future_usage: storage_enums::FutureUsage, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router // TODO: handle this case. Should we add connector_customer_id in paymentConfirmData? } fn push_sessions_token(&mut self, _token: api::SessionToken) { todo!() } fn set_surcharge_details(&mut self, _s...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_pm_token(&mut self, _token: String) { todo!() } fn set_connector_customer_id(&mut self, _customer_id: Option<String>) { // TODO: handle this case. Should we add connector_customer_id in paymentConf...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_email_if_not_present(&mut self, _email: pii::Email) { todo!() } fn set_pm_token(&mut self, _token: String) { todo!() } fn set_connector_customer_id(&mut self, _customer_id: Option<String>)...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option<String>) { todo!() } fn set_email_if_not_present(&mut self, _email: pii::Email) { todo!() } fn set_pm_token(&mut self, _t...
ast_fragments
// file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_payment_method_data(&mut self, _payment_method_data: Option<domain::PaymentMethodData>) { todo!() } fn set_payment_method_id_in_attempt(&mut self, _payment_method_id: Option<String>) { todo!() } fn set_e...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) { self.payment_intent = payment_intent; } fn set_payment_attempt(&mut self, payment_attempt: storage::PaymentAttempt) { self.paymen...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router } #[cfg(feature = "v2")] impl<F: Clone> OperationSessionSetters<F> for PaymentCaptureData<F> { fn set_payment_intent(&mut self, payment_intent: storage::PaymentIntent) { self.payment_intent = payment_intent; } f...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router #[cfg(feature = "v2")] fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> { Some(&self.payment_attempt) } } #[cfg(feature = "v2")] impl<F: Clone> OperationSessionSetters<F> for PaymentCapt...
ast_fragments
// file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn get_capture_method(&self) -> Option<enums::CaptureMethod> { todo!() } #[cfg(feature = "v2")] fn get_optional_payment_attempt(&self) -> Option<&storage::PaymentAttempt> { Some(&self.payment_attempt) } } #[cfg...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn get_currency(&self) -> storage_enums::Currency { self.payment_intent.amount_details.currency } fn get_amount(&self) -> api::Amount { todo!() } fn get_payment_attempt_connector(&self) -> Option...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> { Some(&self.payment_intent.profile_id) } fn get_currency(&self) -> storage_enums::Currency { self.payment_intent.amount_details.curr...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/core/payments.rs | crate: router fn get_recurring_details(&self) -> Option<&RecurringDetails> { todo!() } fn get_payment_intent_profile_id(&self) -> Option<&id_type::ProfileId> { Some(&self.payment_intent.profile_id) } fn get_cu...
ast_fragments