text
stringlengths
65
57.3k
file_path
stringlengths
22
92
module
stringclasses
38 values
type
stringclasses
7 values
struct_name
stringlengths
3
60
impl_count
int64
0
60
traits
listlengths
0
59
tokens
int64
16
8.19k
function_name
stringlengths
3
85
type_name
stringlengths
1
67
trait_name
stringclasses
573 values
method_count
int64
0
31
public_method_count
int64
0
19
submodule_count
int64
0
56
export_count
int64
0
9
// Struct: EcommerceCardPaymentOnlyConfirmationData // File: crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct EcommerceCardPaymentOnlyConfirmationData
crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs
hyperswitch_connectors
struct_definition
EcommerceCardPaymentOnlyConfirmationData
0
[]
57
null
null
null
null
null
null
null
// Function: tokenize_card_api // File: crates/openapi/src/routes/payment_method.rs // Module: openapi pub fn tokenize_card_api()
crates/openapi/src/routes/payment_method.rs
openapi
function_signature
null
null
null
31
tokenize_card_api
null
null
null
null
null
null
// Implementation: impl crate::events::ApiEventMetric for for GlobalCustomerId // File: crates/common_utils/src/id_type/global_id/customer.rs // Module: common_utils // Methods: 1 total (0 public) impl crate::events::ApiEventMetric for for GlobalCustomerId
crates/common_utils/src/id_type/global_id/customer.rs
common_utils
impl_block
null
null
null
58
null
GlobalCustomerId
crate::events::ApiEventMetric for
1
0
null
null
// Implementation: impl api::PaymentAuthorize for for Helcim // File: crates/hyperswitch_connectors/src/connectors/helcim.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::PaymentAuthorize for for Helcim
crates/hyperswitch_connectors/src/connectors/helcim.rs
hyperswitch_connectors
impl_block
null
null
null
61
null
Helcim
api::PaymentAuthorize for
0
0
null
null
// Function: routing_unlink_config // File: crates/router/src/routes/routing.rs // Module: router pub fn routing_unlink_config( state: web::Data<AppState>, req: HttpRequest, path: web::Path<common_utils::id_type::ProfileId>, transaction_type: &enums::TransactionType, ) -> impl Responder
crates/router/src/routes/routing.rs
router
function_signature
null
null
null
76
routing_unlink_config
null
null
null
null
null
null
// Function: find_by_lineage // File: crates/diesel_models/src/query/user/theme.rs // Module: diesel_models pub fn find_by_lineage( conn: &PgPooledConn, lineage: ThemeLineage, ) -> StorageResult<Self>
crates/diesel_models/src/query/user/theme.rs
diesel_models
function_signature
null
null
null
57
find_by_lineage
null
null
null
null
null
null
// Implementation: impl api::PaymentCapture for for Aci // File: crates/hyperswitch_connectors/src/connectors/aci.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::PaymentCapture for for Aci
crates/hyperswitch_connectors/src/connectors/aci.rs
hyperswitch_connectors
impl_block
null
null
null
57
null
Aci
api::PaymentCapture for
0
0
null
null
// Implementation: impl DBOperation // File: crates/diesel_models/src/kv.rs // Module: diesel_models // Methods: 2 total (2 public) impl DBOperation
crates/diesel_models/src/kv.rs
diesel_models
impl_block
null
null
null
40
null
DBOperation
null
2
2
null
null
// Struct: NovalnetPaymentsResponse // File: crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct NovalnetPaymentsResponse
crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs
hyperswitch_connectors
struct_definition
NovalnetPaymentsResponse
0
[]
52
null
null
null
null
null
null
null
// Struct: CustomerId // File: crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct CustomerId
crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
hyperswitch_connectors
struct_definition
CustomerId
0
[]
45
null
null
null
null
null
null
null
// Struct: PaymentMethodMigrateResponse // File: crates/api_models/src/payment_methods.rs // Module: api_models // Implementations: 0 pub struct PaymentMethodMigrateResponse
crates/api_models/src/payment_methods.rs
api_models
struct_definition
PaymentMethodMigrateResponse
0
[]
40
null
null
null
null
null
null
null
// Implementation: impl webhooks::IncomingWebhook for for Fiserv // File: crates/hyperswitch_connectors/src/connectors/fiserv.rs // Module: hyperswitch_connectors // Methods: 3 total (0 public) impl webhooks::IncomingWebhook for for Fiserv
crates/hyperswitch_connectors/src/connectors/fiserv.rs
hyperswitch_connectors
impl_block
null
null
null
64
null
Fiserv
webhooks::IncomingWebhook for
3
0
null
null
// Struct: KlarnaSessionResponse // File: crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct KlarnaSessionResponse
crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs
hyperswitch_connectors
struct_definition
KlarnaSessionResponse
0
[]
50
null
null
null
null
null
null
null
// Struct: ActivePaymentsMetricsAccumulator // File: crates/analytics/src/active_payments/accumulator.rs // Module: analytics // Implementations: 1 pub struct ActivePaymentsMetricsAccumulator
crates/analytics/src/active_payments/accumulator.rs
analytics
struct_definition
ActivePaymentsMetricsAccumulator
1
[]
44
null
null
null
null
null
null
null
// Struct: TrustpayRefundRequestBankRedirect // File: crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct TrustpayRefundRequestBankRedirect
crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
hyperswitch_connectors
struct_definition
TrustpayRefundRequestBankRedirect
0
[]
56
null
null
null
null
null
null
null
// Function: new // File: crates/hyperswitch_connectors/src/connectors/bankofamerica.rs // Module: hyperswitch_connectors pub fn new() -> &'static Self
crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
hyperswitch_connectors
function_signature
null
null
null
41
new
null
null
null
null
null
null
// File: crates/test_utils/tests/connectors/checkout_wh_ui.rs // Module: test_utils use thirtyfour::{prelude::*, WebDriver}; use crate::{selenium::*, tester}; struct CheckoutSeleniumTest; impl SeleniumTest for CheckoutSeleniumTest { fn get_connector_name(&self) -> String { "checkout".to_string() } } async fn should_make_webhook(web_driver: WebDriver) -> Result<(), WebDriverError> { let conn = CheckoutSeleniumTest {}; conn.make_webhook_test( web_driver, &format!("{CHECKOUT_BASE_URL}/saved/18"), vec![ Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))), Event::Trigger(Trigger::Sleep(8)), Event::Assert(Assert::IsPresent("Google")), Event::Assert(Assert::ContainsAny( Selector::QueryParamStr, vec!["status=succeeded", "status=processing"], )), ], 10, "succeeded", ) .await?; Ok(()) } #[test] fn should_make_webhook_test() { tester!(should_make_webhook); }
crates/test_utils/tests/connectors/checkout_wh_ui.rs
test_utils
full_file
null
null
null
246
null
null
null
null
null
null
null
// Struct: TransactionDetails // File: crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs // Module: hyperswitch_domain_models // Implementations: 0 pub struct TransactionDetails
crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs
hyperswitch_domain_models
struct_definition
TransactionDetails
0
[]
45
null
null
null
null
null
null
null
// File: crates/hyperswitch_domain_models/src/transformers.rs // Module: hyperswitch_domain_models pub trait ForeignFrom<F> { fn foreign_from(from: F) -> Self; } pub trait ForeignTryFrom<F>: Sized { type Error; fn foreign_try_from(from: F) -> Result<Self, Self::Error>; }
crates/hyperswitch_domain_models/src/transformers.rs
hyperswitch_domain_models
full_file
null
null
null
74
null
null
null
null
null
null
null
// Implementation: impl PaymentCapture for for Signifyd // File: crates/hyperswitch_connectors/src/connectors/signifyd.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl PaymentCapture for for Signifyd
crates/hyperswitch_connectors/src/connectors/signifyd.rs
hyperswitch_connectors
impl_block
null
null
null
56
null
Signifyd
PaymentCapture for
0
0
null
null
// Function: add_token_for_payment_method // File: crates/router/src/core/payments/tokenization.rs // Module: router pub fn add_token_for_payment_method( router_data: &mut types::RouterData< api::PaymentMethodToken, types::PaymentMethodTokenizationData, types::PaymentsResponseData, >, payment_method_data_request: types::PaymentMethodTokenizationData, state: SessionState, merchant_connector_account_details: &hyperswitch_domain_models::merchant_connector_account::MerchantConnectorAccount, ) -> RouterResult<types::PspTokenResult>
crates/router/src/core/payments/tokenization.rs
router
function_signature
null
null
null
125
add_token_for_payment_method
null
null
null
null
null
null
authentication_id.clone(), &payment_data.payment_intent.payment_id, )) .await?; //If authentication is not successful, skip the payment connector flows and mark the payment as failure if authentication_store.authentication.authentication_status != api_models::enums::AuthenticationStatus::Success { *should_continue_confirm_transaction = false; } Some(authentication_store) } None => None, }; Ok(()) } async fn apply_three_ds_authentication_strategy<'a>( &'a self, state: &SessionState, payment_data: &mut PaymentData<F>, business_profile: &domain::Profile, ) -> CustomResult<(), errors::ApiErrorResponse> { // If the business profile has a three_ds_decision_rule_algorithm, we will use it to determine the 3DS strategy (authentication_type, exemption_type and force_three_ds_challenge) if let Some(three_ds_decision_rule) = business_profile.three_ds_decision_rule_algorithm.clone() { // Parse the three_ds_decision_rule to get the algorithm_id let algorithm_id = three_ds_decision_rule .parse_value::<api::routing::RoutingAlgorithmRef>("RoutingAlgorithmRef") .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Could not decode profile routing algorithm ref")? .algorithm_id .ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("No algorithm_id found in three_ds_decision_rule_algorithm")?; // get additional card info from payment data let additional_card_info = payment_data .payment_attempt .payment_method_data .as_ref() .map(|payment_method_data| { payment_method_data .clone() .parse_value::<api_models::payments::AdditionalPaymentData>( "additional_payment_method_data", ) }) .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("unable to parse value into additional_payment_method_data")? .and_then(|additional_payment_method_data| { additional_payment_method_data.get_additional_card_info() }); // get acquirer details from business profile based on card network let acquirer_config = additional_card_info.as_ref().and_then(|card_info| { card_info .card_network .clone() .and_then(|network| business_profile.get_acquirer_details_from_network(network)) }); let country = business_profile .merchant_country_code .as_ref() .map(|country_code| { country_code.validate_and_get_country_from_merchant_country_code() }) .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Error while parsing country from merchant country code")?; // get three_ds_decision_rule_output using algorithm_id and payment data let decision = three_ds_decision_rule::get_three_ds_decision_rule_output( state, &business_profile.merchant_id, api_models::three_ds_decision_rule::ThreeDsDecisionRuleExecuteRequest { routing_id: algorithm_id, payment: api_models::three_ds_decision_rule::PaymentData { amount: payment_data.payment_intent.amount, currency: payment_data .payment_intent .currency .ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("currency is not set in payment intent")?, }, payment_method: Some( api_models::three_ds_decision_rule::PaymentMethodMetaData { card_network: additional_card_info .as_ref() .and_then(|info| info.card_network.clone()), }, ), issuer: Some(api_models::three_ds_decision_rule::IssuerData { name: additional_card_info .as_ref() .and_then(|info| info.card_issuer.clone()), country: additional_card_info .as_ref() .map(|info| info.card_issuing_country.clone().parse_enum("Country")) .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable( "Error while getting country enum from issuer country", )?, }), customer_device: None, acquirer: acquirer_config.as_ref().map(|acquirer| { api_models::three_ds_decision_rule::AcquirerData { country, fraud_rate: Some(acquirer.acquirer_fraud_rate), } }), }, ) .await?; logger::info!("Three DS Decision Rule Output: {:?}", decision); // We should update authentication_type from the Three DS Decision if it is not already set if payment_data.payment_attempt.authentication_type.is_none() { payment_data.payment_attempt.authentication_type = Some(common_enums::AuthenticationType::foreign_from(decision)); } // We should update psd2_sca_exemption_type from the Three DS Decision payment_data.payment_intent.psd2_sca_exemption_type = decision.foreign_into(); // We should update force_3ds_challenge from the Three DS Decision payment_data.payment_intent.force_3ds_challenge = decision.should_force_3ds_challenge().then_some(true); } Ok(()) } #[allow(clippy::too_many_arguments)] async fn call_unified_authentication_service_if_eligible<'a>( &'a self, state: &SessionState, payment_data: &mut PaymentData<F>, should_continue_confirm_transaction: &mut bool, connector_call_type: &ConnectorCallType, business_profile: &domain::Profile, key_store: &domain::MerchantKeyStore, mandate_type: Option<api_models::payments::MandateTransactionType>, ) -> CustomResult<(), errors::ApiErrorResponse> { let unified_authentication_service_flow = helpers::decide_action_for_unified_authentication_service( state, key_store, business_profile, payment_data, connector_call_type, mandate_type, ) .await?; if let Some(unified_authentication_service_flow) = unified_authentication_service_flow { match unified_authentication_service_flow { helpers::UnifiedAuthenticationServiceFlow::ClickToPayInitiate => { let authentication_product_ids = business_profile .authentication_product_ids .clone() .ok_or(errors::ApiErrorResponse::PreconditionFailed { message: "authentication_product_ids is not configured in business profile" .to_string(), })?; let click_to_pay_mca_id = authentication_product_ids .get_click_to_pay_connector_account_id() .change_context(errors::ApiErrorResponse::MissingRequiredField { field_name: "authentication_product_ids", })?; let key_manager_state = &(state).into(); let merchant_id = &business_profile.merchant_id; let connector_mca = state .store .find_by_merchant_connector_account_merchant_id_merchant_connector_id( key_manager_state, merchant_id, &click_to_pay_mca_id, key_store, ) .await .to_not_found_response( errors::ApiErrorResponse::MerchantConnectorAccountNotFound { id: click_to_pay_mca_id.get_string_repr().to_string(), }, )?; let authentication_id = common_utils::id_type::AuthenticationId::generate_authentication_id(consts::AUTHENTICATION_ID_PREFIX); let payment_method = payment_data.payment_attempt.payment_method.ok_or( errors::ApiErrorResponse::MissingRequiredField { field_name: "payment_method", }, )?; ClickToPay::pre_authentication( state, &payment_data.payment_attempt.merchant_id, Some(&payment_data.payment_intent.payment_id), payment_data.payment_method_data.as_ref(), &helpers::MerchantConnectorAccountType::DbVal(Box::new(connector_mca.clone())), &connector_mca.connector_name, &authentication_id, payment_method, payment_data.payment_intent.amount, payment_data.payment_intent.currency, payment_data.service_details.clone(), None, None, None, None ) .await?; payment_data.payment_attempt.authentication_id = Some(authentication_id.clone()); let response = ClickToPay::post_authentication( state, business_profile, Some(&payment_data.payment_intent.payment_id), &helpers::MerchantConnectorAccountType::DbVal(Box::new(connector_mca.clone())), &connector_mca.connector_name, &authentication_id, payment_method, &payment_data.payment_intent.merchant_id, None ) .await?; let (network_token, authentication_status) = match response.response.clone() { Ok(unified_authentication_service::UasAuthenticationResponseData::PostAuthentication { authentication_details, }) => { let token_details = authentication_details.token_details.ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("Missing authentication_details.token_details")?; (Some( hyperswitch_domain_models::payment_method_data::NetworkTokenData { token_number: token_details.payment_token, token_exp_month: token_details .token_expiration_month, token_exp_year: token_details .token_expiration_year, token_cryptogram: authentication_details .dynamic_data_details .and_then(|data| data.dynamic_data_value), card_issuer: None, card_network: None, card_type: None, card_issuing_country: None, bank_code: None, nick_name: None, eci: authentication_details.eci, }),common_enums::AuthenticationStatus::Success) }, Ok(unified_authentication_service::UasAuthenticationResponseData::PreAuthentication { .. }) | Ok(unified_authentication_service::UasAuthenticationResponseData::Confirmation {}) | Ok(unified_authentication_service::UasAuthenticationResponseData::Authentication { .. }) => Err(errors::ApiErrorResponse::InternalServerError).attach_printable("unexpected response received from unified authentication service")?, Err(_) => (None, common_enums::AuthenticationStatus::Failed) }; payment_data.payment_attempt.payment_method = Some(common_enums::PaymentMethod::Card); payment_data.payment_method_data = network_token .clone() .map(domain::PaymentMethodData::NetworkToken); let authentication = uas_utils::create_new_authentication( state, payment_data.payment_attempt.merchant_id.clone(), Some(connector_mca.connector_name.to_string()), business_profile.get_id().clone(), Some(payment_data.payment_intent.get_id().clone()), Some(click_to_pay_mca_id.to_owned()), &authentication_id, payment_data.service_details.clone(), authentication_status, network_token.clone(), payment_data.payment_attempt.organization_id.clone(), payment_data.payment_intent.force_3ds_challenge, payment_data.payment_intent.psd2_sca_exemption_type, None, None, None, None, None, None, None ) .await?; let authentication_store = hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore { cavv: network_token.and_then(|token| token.token_cryptogram), authentication }; payment_data.authentication = Some(authentication_store); }, helpers::UnifiedAuthenticationServiceFlow::ExternalAuthenticationInitiate { acquirer_details, .. } => { let (authentication_connector, three_ds_connector_account) = authentication::utils::get_authentication_connector_data(state, key_store, business_profile, None).await?; let authentication_connector_name = authentication_connector.to_string(); let authentication_id = common_utils::id_type::AuthenticationId::generate_authentication_id(consts::AUTHENTICATION_ID_PREFIX); let (acquirer_bin, acquirer_merchant_id, acquirer_country_code) = if let Some(details) = &acquirer_details { ( Some(details.acquirer_bin.clone()), Some(details.acquirer_merchant_id.clone()), details.acquirer_country_code.clone(), ) } else { (None, None, None) }; let authentication = uas_utils::create_new_authentication( state, business_profile.merchant_id.clone(), Some(authentication_connector_name.clone()), business_profile.get_id().to_owned(), Some(payment_data.payment_intent.payment_id.clone()), Some(three_ds_connector_account .get_mca_id() .ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("Error while finding mca_id from merchant_connector_account")?), &authentication_id, payment_data.service_details.clone(), common_enums::AuthenticationStatus::Started, None, payment_data.payment_attempt.organization_id.clone(), payment_data.payment_intent.force_3ds_challenge, payment_data.payment_intent.psd2_sca_exemption_type, acquirer_bin, acquirer_merchant_id, acquirer_country_code, None, None, None, None, ) .await?; let acquirer_configs = authentication .profile_acquirer_id .clone() .and_then(|acquirer_id| { business_profile .acquirer_config_map.as_ref() .and_then(|acquirer_config_map| acquirer_config_map.0.get(&acquirer_id).cloned()) }); let metadata: Option<ThreeDsMetaData> = three_ds_connector_account .get_metadata() .map(|metadata| { metadata .expose() .parse_value("ThreeDsMetaData") .attach_printable("Error while parsing ThreeDsMetaData") }) .transpose() .change_context(errors::ApiErrorResponse::InternalServerError)?; let merchant_country_code = authentication.acquirer_country_code.clone(); let return_url = helpers::create_authorize_url( &state.base_url, &payment_data.payment_attempt.clone(), payment_data.payment_attempt.connector.as_ref().get_required_value("connector")?, ); let notification_url = Some(url::Url::parse(&return_url)) .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Failed to parse webhook url")?; let merchant_details = Some(unified_authentication_service::MerchantDetails { merchant_id: Some(authentication.merchant_id.get_string_repr().to_string()), merchant_name: acquirer_configs.clone().map(|detail| detail.merchant_name.clone()).or(metadata.clone().and_then(|metadata| metadata.merchant_name)), merchant_category_code: business_profile.merchant_category_code.or(metadata.clone().and_then(|metadata| metadata.merchant_category_code)), endpoint_prefix: metadata.clone().map(|metadata| metadata.endpoint_prefix), three_ds_requestor_url: business_profile.authentication_connector_details.clone().map(|details| details.three_ds_requestor_url), three_ds_requestor_id: metadata.clone().and_then(|metadata| metadata.three_ds_requestor_id), three_ds_requestor_name: metadata.clone().and_then(|metadata| metadata.three_ds_requestor_name), merchant_country_code: merchant_country_code.map(common_types::payments::MerchantCountryCode::new), notification_url, }); let domain_address = payment_data.address.get_payment_method_billing(); let pre_auth_response = uas_utils::types::ExternalAuthentication::pre_authentication( state, &payment_data.payment_attempt.merchant_id, Some(&payment_data.payment_intent.payment_id), payment_data.payment_method_data.as_ref(), &three_ds_connector_account, &authentication_connector_name, &authentication.authentication_id, payment_data.payment_attempt.payment_method.ok_or( errors::ApiErrorResponse::InternalServerError ).attach_printable("payment_method not found in payment_attempt")?, payment_data.payment_intent.amount, payment_data.payment_intent.currency, payment_data.service_details.clone(), merchant_details.as_ref(), domain_address, authentication.acquirer_bin.clone(), authentication.acquirer_merchant_id.clone(), ) .await?; let updated_authentication = uas_utils::utils::external_authentication_update_trackers( state, pre_auth_response, authentication.clone(), acquirer_details, key_store, None, None, None, None, ).await?; let authentication_store = hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore { cavv: None, // since in case of pre_authentication cavv is not present authentication: updated_authentication.clone(), }; payment_data.authentication = Some(authentication_store.clone()); if updated_authentication.is_separate_authn_required() || updated_authentication.authentication_status.is_failed() { *should_continue_confirm_transaction = false; let default_poll_config = types::PollConfig::default(); let default_config_str = default_poll_config .encode_to_string_of_json() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Error while stringifying default poll config")?; // raise error if authentication_connector is not present since it should we be present in the current flow let authentication_connector = updated_authentication.authentication_connector .ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("authentication_connector not found in updated_authentication")?; let poll_config = state .store .find_config_by_key_unwrap_or( &types::PollConfig::get_poll_config_key( authentication_connector.clone(), ), Some(default_config_str), ) .await .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("The poll config was not found in the DB")?; let poll_config: types::PollConfig = poll_config .config .parse_struct("PollConfig") .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Error while parsing PollConfig")?; payment_data.poll_config = Some(poll_config) } }, helpers::UnifiedAuthenticationServiceFlow::ExternalAuthenticationPostAuthenticate {authentication_id} => { let (authentication_connector, three_ds_connector_account) = authentication::utils::get_authentication_connector_data(state, key_store, business_profile, None).await?; let is_pull_mechanism_enabled = utils::check_if_pull_mechanism_for_external_3ds_enabled_from_connector_metadata( three_ds_connector_account .get_metadata() .map(|metadata| metadata.expose()), ); let authentication = state .store .find_authentication_by_merchant_id_authentication_id( &business_profile.merchant_id, &authentication_id, ) .await .to_not_found_response(errors::ApiErrorResponse::InternalServerError) .attach_printable_lazy(|| format!("Error while fetching authentication record with authentication_id {}", authentication_id.get_string_repr()))?; let updated_authentication = if !authentication.authentication_status.is_terminal_status() && is_pull_mechanism_enabled { let post_auth_response = uas_utils::types::ExternalAuthentication::post_authentication( state, business_profile, Some(&payment_data.payment_intent.payment_id), &three_ds_connector_account, &authentication_connector.to_string(), &authentication.authentication_id, payment_data.payment_attempt.payment_method.ok_or( errors::ApiErrorResponse::InternalServerError ).attach_printable("payment_method not found in payment_attempt")?, &payment_data.payment_intent.merchant_id, Some(&authentication), ).await?; uas_utils::utils::external_authentication_update_trackers( state, post_auth_response, authentication, None, key_store, None, None, None, None, ).await? } else { authentication }; let tokenized_data = crate::core::payment_methods::vault::get_tokenized_data(state, authentication_id.get_string_repr(), false, key_store.key.get_inner()).await?; let authentication_store = hyperswitch_domain_models::router_request_types::authentication::AuthenticationStore { cavv: Some(masking::Secret::new(tokenized_data.value1)), authentication: updated_authentication }; payment_data.authentication = Some(authentication_store.clone()); //If authentication is not successful, skip the payment connector flows and mark the payment as failure if authentication_store.authentication.authentication_status != api_models::enums::AuthenticationStatus::Success { *should_continue_confirm_transaction = false; } }, } } Ok(()) } #[instrument(skip_all)] async fn guard_payment_against_blocklist<'a>( &'a self, state: &SessionState, merchant_context: &domain::MerchantContext, payment_data: &mut PaymentData<F>, ) -> CustomResult<bool, errors::ApiErrorResponse> { blocklist_utils::validate_data_for_blocklist(state, merchant_context, payment_data).await } #[instrument(skip_all)] async fn store_extended_card_info_temporarily<'a>( &'a self, state: &SessionState, payment_id: &common_utils::id_type::PaymentId, business_profile: &domain::Profile, payment_method_data: Option<&domain::PaymentMethodData>, ) -> CustomResult<(), errors::ApiErrorResponse> { if let (Some(true), Some(domain::PaymentMethodData::Card(card)), Some(merchant_config)) = ( business_profile.is_extended_card_info_enabled, payment_method_data, business_profile.extended_card_info_config.clone(), ) { let merchant_config = merchant_config .expose() .parse_value::<ExtendedCardInfoConfig>("ExtendedCardInfoConfig") .map_err(|err| logger::error!(parse_err=?err,"Error while parsing ExtendedCardInfoConfig")); let card_data = ExtendedCardInfo::from(card.clone()) .encode_to_vec() .map_err(|err| logger::error!(encode_err=?err,"Error while encoding ExtendedCardInfo to vec")); let (Ok(merchant_config), Ok(card_data)) = (merchant_config, card_data) else { return Ok(()); }; let encrypted_payload = services::encrypt_jwe(&card_data, merchant_config.public_key.peek(), services::EncryptionAlgorithm::A256GCM, None) .await .map_err(|err| { logger::error!(jwe_encryption_err=?err,"Error while JWE encrypting extended card info") }); let Ok(encrypted_payload) = encrypted_payload else { return Ok(()); }; let redis_conn = state .store .get_redis_conn() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Failed to get redis connection")?; let key = helpers::get_redis_key_for_extended_card_info( &business_profile.merchant_id, payment_id, ); redis_conn .set_key_with_expiry( &key.into(), encrypted_payload.clone(), (*merchant_config.ttl_in_secs).into(), ) .await .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Failed to add extended card info in redis")?; logger::info!("Extended card info added to redis"); } Ok(()) } } #[cfg(feature = "v2")] #[async_trait] impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for PaymentConfirm { #[instrument(skip_all)] async fn update_trackers<'b>( &'b self, _state: &'b SessionState, _req_state: ReqState, mut _payment_data: PaymentData<F>, _customer: Option<domain::Customer>, _storage_scheme: storage_enums::MerchantStorageScheme, _updated_customer: Option<storage::CustomerUpdate>, _key_store: &domain::MerchantKeyStore, _frm_suggestion: Option<FrmSuggestion>, _header_payload: hyperswitch_domain_models::payments::HeaderPayload, ) -> RouterResult<( BoxedOperation<'b, F, api::PaymentsRequest, PaymentData<F>>, PaymentData<F>, )> where F: 'b + Send, { todo!() } } #[cfg(feature = "v1")] #[async_trait] impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for PaymentConfirm { #[instrument(skip_all)] async fn update_trackers<'b>( &'b self, state: &'b SessionState, req_state: ReqState, mut payment_data: PaymentData<F>, customer: Option<domain::Customer>, storage_scheme: storage_enums::MerchantStorageScheme, updated_customer: Option<storage::CustomerUpdate>, key_store: &domain::MerchantKeyStore, frm_suggestion: Option<FrmSuggestion>, header_payload: hyperswitch_domain_models::payments::HeaderPayload, ) -> RouterResult<( BoxedOperation<'b, F, api::PaymentsRequest, PaymentData<F>>, PaymentData<F>, )> where F: 'b + Send, { let payment_method = payment_data.payment_attempt.payment_method; let browser_info = payment_data.payment_attempt.browser_info.clone(); let frm_message = payment_data.frm_message.clone(); let capture_method = payment_data.payment_attempt.capture_method; let default_status_result = ( storage_enums::IntentStatus::Processing, storage_enums::AttemptStatus::Pending, (None, None), ); let status_handler_for_frm_results = |frm_suggestion: FrmSuggestion| match frm_suggestion { FrmSuggestion::FrmCancelTransaction => ( storage_enums::IntentStatus::Failed, storage_enums::AttemptStatus::Failure, frm_message.map_or((None, None), |fraud_check| { ( Some(Some(fraud_check.frm_status.to_string())), Some(fraud_check.frm_reason.map(|reason| reason.to_string())), ) }), ), FrmSuggestion::FrmManualReview => ( storage_enums::IntentStatus::RequiresMerchantAction, storage_enums::AttemptStatus::Unresolved, (None, None), ), FrmSuggestion::FrmAuthorizeTransaction => ( storage_enums::IntentStatus::RequiresCapture, storage_enums::AttemptStatus::Authorized, (None, None), ), }; let status_handler_for_authentication_results = |authentication: &storage::Authentication| { if authentication.authentication_status.is_failed() { ( storage_enums::IntentStatus::Failed, storage_enums::AttemptStatus::Failure, ( Some(Some("EXTERNAL_AUTHENTICATION_FAILURE".to_string())), Some(Some("external authentication failure".to_string())), ), ) } else if authentication.is_separate_authn_required() { ( storage_enums::IntentStatus::RequiresCustomerAction, storage_enums::AttemptStatus::AuthenticationPending, (None, None), ) } else { default_status_result.clone() } }; let (intent_status, attempt_status, (error_code, error_message)) = match (frm_suggestion, payment_data.authentication.as_ref()) { (Some(frm_suggestion), _) => status_handler_for_frm_results(frm_suggestion), (_, Some(authentication_details)) => status_handler_for_authentication_results( &authentication_details.authentication, ), _ => default_status_result, }; let connector = payment_data.payment_attempt.connector.clone(); let merchant_connector_id = payment_data.payment_attempt.merchant_connector_id.clone(); let connector_request_reference_id = payment_data .payment_attempt .connector_request_reference_id .clone(); let straight_through_algorithm = payment_data .payment_attempt .straight_through_algorithm .clone(); let payment_token = payment_data.token.clone(); let payment_method_type = payment_data.payment_attempt.payment_method_type; let profile_id = payment_data .payment_intent .profile_id .as_ref() .get_required_value("profile_id") .change_context(errors::ApiErrorResponse::InternalServerError)?; let payment_experience = payment_data.payment_attempt.payment_experience; let additional_pm_data = payment_data .payment_method_data .as_ref() .async_map(|payment_method_data| async { helpers::get_additional_payment_data(payment_method_data, &*state.store, profile_id) .await }) .await .transpose()? .flatten(); let encoded_additional_pm_data = additional_pm_data .as_ref() .map(Encode::encode_to_value) .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Failed to encode additional pm data")?; let customer_details = payment_data.payment_intent.customer_details.clone(); let business_sub_label = payment_data.payment_attempt.business_sub_label.clone(); let authentication_type = payment_data.payment_attempt.authentication_type; let (shipping_address_id, billing_address_id, payment_method_billing_address_id) = ( payment_data.payment_intent.shipping_address_id.clone(), payment_data.payment_intent.billing_address_id.clone(), payment_data .payment_attempt .payment_method_billing_address_id .clone(), ); let customer_id = customer.clone().map(|c| c.customer_id); let return_url = payment_data.payment_intent.return_url.take(); let setup_future_usage = payment_data.payment_intent.setup_future_usage; let business_label = payment_data.payment_intent.business_label.clone(); let business_country = payment_data.payment_intent.business_country; let description = payment_data.payment_intent.description.take(); let statement_descriptor_name = payment_data.payment_intent.statement_descriptor_name.take(); let statement_descriptor_suffix = payment_data .payment_intent .statement_descriptor_suffix .take(); let order_details = payment_data.payment_intent.order_details.clone(); let metadata = payment_data.payment_intent.metadata.clone(); let frm_metadata = payment_data.payment_intent.frm_metadata.clone(); let client_source = header_payload .client_source .clone() .or(payment_data.payment_attempt.client_source.clone()); let client_version = header_payload .client_version .clone() .or(payment_data.payment_attempt.client_version.clone()); let m_payment_data_payment_attempt = payment_data.payment_attempt.clone(); let m_payment_method_id = payment_data .payment_attempt .payment_method_id .clone() .or(payment_data .payment_method_info .as_ref() .map(|payment_method| payment_method.payment_method_id.clone())); let m_browser_info = browser_info.clone(); let m_connector = connector.clone(); let m_capture_method = capture_method; let m_payment_token = payment_token.clone(); let m_additional_pm_data = encoded_additional_pm_data .clone() .or(payment_data.payment_attempt.payment_method_data.clone()); let m_business_sub_label = business_sub_label.clone(); let m_straight_through_algorithm = straight_through_algorithm.clone(); let m_error_code = error_code.clone(); let m_error_message = error_message.clone(); let m_fingerprint_id = payment_data.payment_attempt.fingerprint_id.clone(); let m_db = state.clone().store; let surcharge_amount = payment_data .surcharge_details .as_ref() .map(|surcharge_details| surcharge_details.surcharge_amount); let tax_amount = payment_data .surcharge_details .as_ref() .map(|surcharge_details| surcharge_details.tax_on_surcharge_amount); let ( external_three_ds_authentication_attempted, authentication_connector, authentication_id, ) = match payment_data.authentication.as_ref() { Some(authentication_store) => ( Some( authentication_store .authentication .is_separate_authn_required(), ), authentication_store .authentication .authentication_connector .clone(), Some( authentication_store .authentication .authentication_id .clone(), ), ), None => (None, None, None), }; let card_discovery = payment_data.get_card_discovery_for_card_payment_method(); let is_stored_credential = helpers::is_stored_credential( &payment_data.recurring_details, &payment_data.pm_token, payment_data.mandate_id.is_some(), payment_data.payment_attempt.is_stored_credential, ); let payment_attempt_fut = tokio::spawn( async move { m_db.update_payment_attempt_with_attempt_id( m_payment_data_payment_attempt, storage::PaymentAttemptUpdate::ConfirmUpdate { currency: payment_data.currency, status: attempt_status, payment_method, authentication_type, capture_method: m_capture_method, browser_info: m_browser_info, connector: m_connector, payment_token: m_payment_token, payment_method_data: m_additional_pm_data, payment_method_type, payment_experience, business_sub_label: m_business_sub_label, straight_through_algorithm: m_straight_through_algorithm, error_code: m_error_code, error_message: m_error_message, updated_by: storage_scheme.to_string(), merchant_connector_id, external_three_ds_authentication_attempted, authentication_connector, authentication_id, payment_method_billing_address_id, fingerprint_id: m_fingerprint_id, payment_method_id: m_payment_method_id, client_source, client_version, customer_acceptance: payment_data.payment_attempt.customer_acceptance, net_amount: hyperswitch_domain_models::payments::payment_attempt::NetAmount::new( payment_data.payment_attempt.net_amount.get_order_amount(), payment_data.payment_intent.shipping_cost, payment_data .payment_attempt .net_amount .get_order_tax_amount(), surcharge_amount, tax_amount, ), connector_mandate_detail: payment_data .payment_attempt .connector_mandate_detail, card_discovery, routing_approach: payment_data.payment_attempt.routing_approach, connector_request_reference_id, network_transaction_id: payment_data .payment_attempt .network_transaction_id .clone(), is_stored_credential, request_extended_authorization: payment_data .payment_attempt .request_extended_authorization, }, storage_scheme, ) .map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)) .await } .in_current_span(), ); let billing_address = payment_data.address.get_payment_billing(); let key_manager_state = state.into(); let billing_details = billing_address .async_map(|billing_details| { create_encrypted_data(&key_manager_state, key_store, billing_details) }) .await .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Unable to encrypt billing details")?; let shipping_address = payment_data.address.get_shipping(); let shipping_details = shipping_address .async_map(|shipping_details| { create_encrypted_data(&key_manager_state, key_store, shipping_details) }) .await .transpose() .change_context(errors::ApiErrorResponse::InternalServerError) .attach_printable("Unable to encrypt shipping details")?; let m_payment_data_payment_intent = payment_data.payment_intent.clone(); let m_customer_id = customer_id.clone(); let m_shipping_address_id = shipping_address_id.clone(); let m_billing_address_id = billing_address_id.clone(); let m_return_url = return_url.clone(); let m_business_label = business_label.clone(); let m_description = description.clone(); let m_statement_descriptor_name = statement_descriptor_name.clone(); let m_statement_descriptor_suffix = statement_descriptor_suffix.clone(); let m_order_details = order_details.clone(); let m_metadata = metadata.clone(); let m_frm_metadata = frm_metadata.clone(); let m_db = state.clone().store; let m_storage_scheme = storage_scheme.to_string(); let session_expiry = m_payment_data_payment_intent.session_expiry; let m_key_store = key_store.clone(); let key_manager_state = state.into(); let is_payment_processor_token_flow = payment_data.payment_intent.is_payment_processor_token_flow; let payment_intent_fut = tokio::spawn( async move { m_db.update_payment_intent( &key_manager_state, m_payment_data_payment_intent, storage::PaymentIntentUpdate::Update(Box::new(PaymentIntentUpdateFields { amount: payment_data.payment_intent.amount, currency: payment_data.currency, setup_future_usage, status: intent_status, customer_id: m_customer_id, shipping_address_id: m_shipping_address_id, billing_address_id: m_billing_address_id, return_url: m_return_url, business_country, business_label: m_business_label, description: m_description, statement_descriptor_name: m_statement_descriptor_name, statement_descriptor_suffix: m_statement_descriptor_suffix, order_details: m_order_details, metadata: m_metadata, payment_confirm_source: header_payload.payment_confirm_source, updated_by: m_storage_scheme, fingerprint_id: None, session_expiry, request_external_three_ds_authentication: None, frm_metadata: m_frm_metadata, customer_details, merchant_order_reference_id: None, billing_details, shipping_details, is_payment_processor_token_flow, tax_details: None, force_3ds_challenge: payment_data.payment_intent.force_3ds_challenge, is_iframe_redirection_enabled: payment_data .payment_intent .is_iframe_redirection_enabled, is_confirm_operation: true, // Indicates that this is a confirm operation payment_channel: payment_data.payment_intent.payment_channel, feature_metadata: payment_data .payment_intent .feature_metadata .clone() .map(masking::Secret::new), tax_status: payment_data.payment_intent.tax_status, discount_amount: payment_data.payment_intent.discount_amount, order_date: payment_data.payment_intent.order_date, shipping_amount_tax: payment_data.payment_intent.shipping_amount_tax, duty_amount: payment_data.payment_intent.duty_amount, enable_partial_authorization: payment_data .payment_intent .enable_partial_authorization, enable_overcapture: payment_data.payment_intent.enable_overcapture, })), &m_key_store, storage_scheme, ) .map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)) .await } .in_current_span(), ); let customer_fut = if let Some((updated_customer, customer)) = updated_customer.zip(customer) { let m_customer_merchant_id = customer.merchant_id.to_owned(); let m_key_store = key_store.clone(); let m_updated_customer = updated_customer.clone(); let session_state = state.clone(); let m_db = session_state.store.clone();
crates/router/src/core/payments/operations/payment_confirm.rs#chunk1
router
chunk
null
null
null
8,191
null
null
null
null
null
null
null
// Struct: SyncRequest // File: crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct SyncRequest
crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs
hyperswitch_connectors
struct_definition
SyncRequest
0
[]
46
null
null
null
null
null
null
null
// Implementation: impl Responder // File: crates/router/src/routes/payments.rs // Module: router // Methods: 0 total (0 public) impl Responder
crates/router/src/routes/payments.rs
router
impl_block
null
null
null
36
null
Responder
null
0
0
null
null
// Struct: ApplePayPaymentInformation // File: crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct ApplePayPaymentInformation
crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
hyperswitch_connectors
struct_definition
ApplePayPaymentInformation
0
[]
51
null
null
null
null
null
null
null
// Function: enum_nums_inner // File: crates/euclid_macros/src/inner/enum_nums.rs // Module: euclid_macros pub fn enum_nums_inner(ts: TokenStream) -> TokenStream
crates/euclid_macros/src/inner/enum_nums.rs
euclid_macros
function_signature
null
null
null
43
enum_nums_inner
null
null
null
null
null
null
// Implementation: impl api::Payment for for Juspaythreedsserver // File: crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::Payment for for Juspaythreedsserver
crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs
hyperswitch_connectors
impl_block
null
null
null
70
null
Juspaythreedsserver
api::Payment for
0
0
null
null
// Struct: PaymentsAuthorizeData // File: crates/hyperswitch_domain_models/src/router_request_types.rs // Module: hyperswitch_domain_models // Implementations: 0 pub struct PaymentsAuthorizeData
crates/hyperswitch_domain_models/src/router_request_types.rs
hyperswitch_domain_models
struct_definition
PaymentsAuthorizeData
0
[]
43
null
null
null
null
null
null
null
// Implementation: impl ConnectorAccessToken for for Riskified // File: crates/hyperswitch_connectors/src/connectors/riskified.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl ConnectorAccessToken for for Riskified
crates/hyperswitch_connectors/src/connectors/riskified.rs
hyperswitch_connectors
impl_block
null
null
null
54
null
Riskified
ConnectorAccessToken for
0
0
null
null
// Struct: PaymentMethodCard // File: crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct PaymentMethodCard
crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs
hyperswitch_connectors
struct_definition
PaymentMethodCard
0
[]
49
null
null
null
null
null
null
null
// Function: payment_receipt // File: crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs // Module: hyperswitch_connectors // Documentation: Get payment receipt (like Fiserv's payment_receipt) pub fn payment_receipt(&self) -> AuthipayPaymentReceipt
crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
hyperswitch_connectors
function_signature
null
null
null
61
payment_receipt
null
null
null
null
null
null
// Struct: GpaymentsPreAuthenticationResponse // File: crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct GpaymentsPreAuthenticationResponse
crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs
hyperswitch_connectors
struct_definition
GpaymentsPreAuthenticationResponse
0
[]
51
null
null
null
null
null
null
null
// Implementation: impl api::Payment for for Thunes // File: crates/hyperswitch_connectors/src/connectors/thunes.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::Payment for for Thunes
crates/hyperswitch_connectors/src/connectors/thunes.rs
hyperswitch_connectors
impl_block
null
null
null
55
null
Thunes
api::Payment for
0
0
null
null
// Struct: PaymentMethodListRequest // File: crates/api_models/src/payment_methods.rs // Module: api_models // Implementations: 0 pub struct PaymentMethodListRequest
crates/api_models/src/payment_methods.rs
api_models
struct_definition
PaymentMethodListRequest
0
[]
38
null
null
null
null
null
null
null
// Function: is_four_decimal_currency // File: crates/common_enums/src/enums.rs // Module: common_enums pub fn is_four_decimal_currency(self) -> bool
crates/common_enums/src/enums.rs
common_enums
function_signature
null
null
null
37
is_four_decimal_currency
null
null
null
null
null
null
// Struct: SurchargeDecisionConfigs // File: crates/api_models/src/surcharge_decision_configs.rs // Module: api_models // Implementations: 1 // Traits: EuclidDirFilter pub struct SurchargeDecisionConfigs
crates/api_models/src/surcharge_decision_configs.rs
api_models
struct_definition
SurchargeDecisionConfigs
1
[ "EuclidDirFilter" ]
49
null
null
null
null
null
null
null
// File: crates/storage_impl/src/cards_info.rs // Module: storage_impl pub use diesel_models::{CardInfo, UpdateCardInfo}; use error_stack::report; use hyperswitch_domain_models::cards_info::CardsInfoInterface; use router_env::{instrument, tracing}; use crate::{ errors::StorageError, kv_router_store::KVRouterStore, redis::kv_store::KvStorePartition, utils::{pg_connection_read, pg_connection_write}, CustomResult, DatabaseStore, MockDb, RouterStore, }; impl KvStorePartition for CardInfo {} #[async_trait::async_trait] impl<T: DatabaseStore> CardsInfoInterface for RouterStore<T> { type Error = StorageError; #[instrument(skip_all)] async fn get_card_info(&self, card_iin: &str) -> CustomResult<Option<CardInfo>, StorageError> { let conn = pg_connection_read(self).await?; CardInfo::find_by_iin(&conn, card_iin) .await .map_err(|error| report!(StorageError::from(error))) } #[instrument(skip_all)] async fn add_card_info(&self, data: CardInfo) -> CustomResult<CardInfo, StorageError> { let conn = pg_connection_write(self).await?; data.insert(&conn) .await .map_err(|error| report!(StorageError::from(error))) } #[instrument(skip_all)] async fn update_card_info( &self, card_iin: String, data: UpdateCardInfo, ) -> CustomResult<CardInfo, StorageError> { let conn = pg_connection_write(self).await?; CardInfo::update(&conn, card_iin, data) .await .map_err(|error| report!(StorageError::from(error))) } } #[async_trait::async_trait] impl<T: DatabaseStore> CardsInfoInterface for KVRouterStore<T> { type Error = StorageError; #[instrument(skip_all)] async fn get_card_info(&self, card_iin: &str) -> CustomResult<Option<CardInfo>, StorageError> { let conn = pg_connection_read(self).await?; CardInfo::find_by_iin(&conn, card_iin) .await .map_err(|error| report!(StorageError::from(error))) } #[instrument(skip_all)] async fn add_card_info(&self, data: CardInfo) -> CustomResult<CardInfo, StorageError> { let conn = pg_connection_write(self).await?; data.insert(&conn) .await .map_err(|error| report!(StorageError::from(error))) } #[instrument(skip_all)] async fn update_card_info( &self, card_iin: String, data: UpdateCardInfo, ) -> CustomResult<CardInfo, StorageError> { let conn = pg_connection_write(self).await?; CardInfo::update(&conn, card_iin, data) .await .map_err(|error| report!(StorageError::from(error))) } } #[async_trait::async_trait] impl CardsInfoInterface for MockDb { type Error = StorageError; #[instrument(skip_all)] async fn get_card_info(&self, card_iin: &str) -> CustomResult<Option<CardInfo>, StorageError> { Ok(self .cards_info .lock() .await .iter() .find(|ci| ci.card_iin == card_iin) .cloned()) } async fn add_card_info(&self, _data: CardInfo) -> CustomResult<CardInfo, StorageError> { Err(StorageError::MockDbError)? } async fn update_card_info( &self, _card_iin: String, _data: UpdateCardInfo, ) -> CustomResult<CardInfo, StorageError> { Err(StorageError::MockDbError)? } }
crates/storage_impl/src/cards_info.rs
storage_impl
full_file
null
null
null
840
null
null
null
null
null
null
null
// Trait: ActivePaymentsMetricAnalytics // File: crates/analytics/src/active_payments/metrics.rs // Module: analytics pub trait ActivePaymentsMetricAnalytics: LoadRow<ActivePaymentsMetricRow>
crates/analytics/src/active_payments/metrics.rs
analytics
trait_definition
null
null
null
42
null
null
ActivePaymentsMetricAnalytics
null
null
null
null
// Implementation: impl Responder // File: crates/router/src/routes/routing.rs // Module: router // Methods: 0 total (0 public) impl Responder
crates/router/src/routes/routing.rs
router
impl_block
null
null
null
36
null
Responder
null
0
0
null
null
// File: crates/router/src/services/authorization/roles/predefined_roles.rs // Module: router use std::{collections::HashMap, sync::LazyLock}; use common_enums::{EntityType, PermissionGroup, RoleScope}; use super::RoleInfo; use crate::consts; pub static PREDEFINED_ROLES: LazyLock<HashMap<&'static str, RoleInfo>> = LazyLock::new(|| { let mut roles = HashMap::new(); // Internal Roles roles.insert( common_utils::consts::ROLE_ID_INTERNAL_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::ConnectorsManage, PermissionGroup::WorkflowsView, PermissionGroup::WorkflowsManage, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, PermissionGroup::OrganizationManage, PermissionGroup::ReconOpsView, PermissionGroup::ReconOpsManage, PermissionGroup::ReconReportsView, PermissionGroup::ReconReportsManage, ], role_id: common_utils::consts::ROLE_ID_INTERNAL_ADMIN.to_string(), role_name: "internal_admin".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: false, is_deletable: false, is_updatable: false, is_internal: true, }, ); roles.insert( common_utils::consts::ROLE_ID_INTERNAL_VIEW_ONLY_USER, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::ConnectorsView, PermissionGroup::WorkflowsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::ReconOpsView, PermissionGroup::ReconReportsView, ], role_id: common_utils::consts::ROLE_ID_INTERNAL_VIEW_ONLY_USER.to_string(), role_name: "internal_view_only".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: false, is_deletable: false, is_updatable: false, is_internal: true, }, ); roles.insert( common_utils::consts::ROLE_ID_INTERNAL_DEMO, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::ConnectorsView, PermissionGroup::WorkflowsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::ReconOpsView, PermissionGroup::ReconReportsView, PermissionGroup::InternalManage, ], role_id: common_utils::consts::ROLE_ID_INTERNAL_DEMO.to_string(), role_name: "internal_demo".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: false, is_deletable: false, is_updatable: false, is_internal: true, }, ); // Tenant Roles roles.insert( common_utils::consts::ROLE_ID_TENANT_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::ConnectorsManage, PermissionGroup::WorkflowsView, PermissionGroup::WorkflowsManage, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, PermissionGroup::OrganizationManage, PermissionGroup::ReconOpsView, PermissionGroup::ReconOpsManage, PermissionGroup::ReconReportsView, PermissionGroup::ReconReportsManage, ], role_id: common_utils::consts::ROLE_ID_TENANT_ADMIN.to_string(), role_name: "tenant_admin".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Tenant, is_invitable: false, is_deletable: false, is_updatable: false, is_internal: false, }, ); // Organization Roles roles.insert( common_utils::consts::ROLE_ID_ORGANIZATION_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::ConnectorsManage, PermissionGroup::WorkflowsView, PermissionGroup::WorkflowsManage, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, PermissionGroup::OrganizationManage, PermissionGroup::ReconOpsView, PermissionGroup::ReconOpsManage, PermissionGroup::ReconReportsView, PermissionGroup::ReconReportsManage, PermissionGroup::ThemeView, PermissionGroup::ThemeManage, ], role_id: common_utils::consts::ROLE_ID_ORGANIZATION_ADMIN.to_string(), role_name: "organization_admin".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Organization, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); // MERCHANT ROLES roles.insert( consts::user_role::ROLE_ID_MERCHANT_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::ConnectorsManage, PermissionGroup::WorkflowsView, PermissionGroup::WorkflowsManage, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, PermissionGroup::ReconOpsView, PermissionGroup::ReconOpsManage, PermissionGroup::ReconReportsView, PermissionGroup::ReconReportsManage, ], role_id: consts::user_role::ROLE_ID_MERCHANT_ADMIN.to_string(), role_name: "merchant_admin".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_MERCHANT_VIEW_ONLY, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::ConnectorsView, PermissionGroup::WorkflowsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::ReconOpsView, PermissionGroup::ReconReportsView, ], role_id: consts::user_role::ROLE_ID_MERCHANT_VIEW_ONLY.to_string(), role_name: "merchant_view_only".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_MERCHANT_IAM_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, ], role_id: consts::user_role::ROLE_ID_MERCHANT_IAM_ADMIN.to_string(), role_name: "merchant_iam".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_MERCHANT_DEVELOPER, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::ConnectorsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, PermissionGroup::ReconOpsView, PermissionGroup::ReconReportsView, ], role_id: consts::user_role::ROLE_ID_MERCHANT_DEVELOPER.to_string(), role_name: "merchant_developer".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_MERCHANT_OPERATOR, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::WorkflowsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::ReconOpsView, PermissionGroup::ReconOpsManage, PermissionGroup::ReconReportsView, ], role_id: consts::user_role::ROLE_ID_MERCHANT_OPERATOR.to_string(), role_name: "merchant_operator".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_MERCHANT_CUSTOMER_SUPPORT, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::ReconOpsView, PermissionGroup::ReconReportsView, ], role_id: consts::user_role::ROLE_ID_MERCHANT_CUSTOMER_SUPPORT.to_string(), role_name: "customer_support".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Merchant, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); // Profile Roles roles.insert( consts::user_role::ROLE_ID_PROFILE_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::ConnectorsManage, PermissionGroup::WorkflowsView, PermissionGroup::WorkflowsManage, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, ], role_id: consts::user_role::ROLE_ID_PROFILE_ADMIN.to_string(), role_name: "profile_admin".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Profile, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_PROFILE_VIEW_ONLY, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::ConnectorsView, PermissionGroup::WorkflowsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, ], role_id: consts::user_role::ROLE_ID_PROFILE_VIEW_ONLY.to_string(), role_name: "profile_view_only".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Profile, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_PROFILE_IAM_ADMIN, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::UsersManage, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, ], role_id: consts::user_role::ROLE_ID_PROFILE_IAM_ADMIN.to_string(), role_name: "profile_iam".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Profile, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_PROFILE_DEVELOPER, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::ConnectorsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, PermissionGroup::MerchantDetailsManage, PermissionGroup::AccountManage, ], role_id: consts::user_role::ROLE_ID_PROFILE_DEVELOPER.to_string(), role_name: "profile_developer".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Profile, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_PROFILE_OPERATOR, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::OperationsManage, PermissionGroup::ConnectorsView, PermissionGroup::WorkflowsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, ], role_id: consts::user_role::ROLE_ID_PROFILE_OPERATOR.to_string(), role_name: "profile_operator".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Profile, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles.insert( consts::user_role::ROLE_ID_PROFILE_CUSTOMER_SUPPORT, RoleInfo { groups: vec![ PermissionGroup::OperationsView, PermissionGroup::AnalyticsView, PermissionGroup::UsersView, PermissionGroup::MerchantDetailsView, PermissionGroup::AccountView, ], role_id: consts::user_role::ROLE_ID_PROFILE_CUSTOMER_SUPPORT.to_string(), role_name: "profile_customer_support".to_string(), scope: RoleScope::Organization, entity_type: EntityType::Profile, is_invitable: true, is_deletable: true, is_updatable: true, is_internal: false, }, ); roles });
crates/router/src/services/authorization/roles/predefined_roles.rs
router
full_file
null
null
null
3,287
null
null
null
null
null
null
null
// Function: get_connector_name // File: crates/hyperswitch_domain_models/src/merchant_connector_account.rs // Module: hyperswitch_domain_models pub fn get_connector_name(&self) -> Option<common_enums::connector_enums::Connector>
crates/hyperswitch_domain_models/src/merchant_connector_account.rs
hyperswitch_domain_models
function_signature
null
null
null
53
get_connector_name
null
null
null
null
null
null
// Struct: BillingConnectorPaymentsSyncFlowData // File: crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs // Module: hyperswitch_domain_models // Implementations: 0 pub struct BillingConnectorPaymentsSyncFlowData
crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs
hyperswitch_domain_models
struct_definition
BillingConnectorPaymentsSyncFlowData
0
[]
54
null
null
null
null
null
null
null
// Struct: InitPayment // File: crates/hyperswitch_domain_models/src/router_flow_types/payments.rs // Module: hyperswitch_domain_models // Implementations: 0 pub struct InitPayment
crates/hyperswitch_domain_models/src/router_flow_types/payments.rs
hyperswitch_domain_models
struct_definition
InitPayment
0
[]
43
null
null
null
null
null
null
null
// Struct: Barclaycard // File: crates/hyperswitch_connectors/src/connectors/barclaycard.rs // Module: hyperswitch_connectors // Implementations: 20 // Traits: api::Payment, api::PaymentSession, api::PaymentsPreProcessing, api::ConnectorAccessToken, api::MandateSetup, api::PaymentAuthorize, api::PaymentSync, api::PaymentCapture, api::PaymentsCompleteAuthorize, api::PaymentVoid, api::Refund, api::RefundExecute, api::RefundSync, api::PaymentToken, ConnectorCommon, ConnectorValidation, webhooks::IncomingWebhook, ConnectorSpecifications pub struct Barclaycard
crates/hyperswitch_connectors/src/connectors/barclaycard.rs
hyperswitch_connectors
struct_definition
Barclaycard
20
[ "api::Payment", "api::PaymentSession", "api::PaymentsPreProcessing", "api::ConnectorAccessToken", "api::MandateSetup", "api::PaymentAuthorize", "api::PaymentSync", "api::PaymentCapture", "api::PaymentsCompleteAuthorize", "api::PaymentVoid", "api::Refund", "api::RefundExecute", "api::RefundSync", "api::PaymentToken", "ConnectorCommon", "ConnectorValidation", "webhooks::IncomingWebhook", "ConnectorSpecifications" ]
141
null
null
null
null
null
null
null
// Function: get_and_deserialize_key // File: crates/router/src/db.rs // Module: router pub fn get_and_deserialize_key<T>( db: &dyn StorageInterface, key: &str, type_name: &'static str, ) -> CustomResult<T, RedisError> where T: serde::de::DeserializeOwned,
crates/router/src/db.rs
router
function_signature
null
null
null
75
get_and_deserialize_key
null
null
null
null
null
null
// Implementation: impl PayoutAttemptInterface for for MockDb // File: crates/storage_impl/src/mock_db.rs // Module: storage_impl // Methods: 0 total (0 public) impl PayoutAttemptInterface for for MockDb
crates/storage_impl/src/mock_db.rs
storage_impl
impl_block
null
null
null
49
null
MockDb
PayoutAttemptInterface for
0
0
null
null
// Struct: BarclaycardConsumerAuthValidateResponse // File: crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct BarclaycardConsumerAuthValidateResponse
crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs
hyperswitch_connectors
struct_definition
BarclaycardConsumerAuthValidateResponse
0
[]
57
null
null
null
null
null
null
null
// Function: create_platform // File: crates/router/src/routes/user.rs // Module: router pub fn create_platform( state: web::Data<AppState>, req: HttpRequest, json_payload: web::Json<user_api::PlatformAccountCreateRequest>, ) -> HttpResponse
crates/router/src/routes/user.rs
router
function_signature
null
null
null
59
create_platform
null
null
null
null
null
null
// Function: get_user_id // File: crates/api_models/src/external_service_auth.rs // Module: api_models pub fn get_user_id(&self) -> &str
crates/api_models/src/external_service_auth.rs
api_models
function_signature
null
null
null
37
get_user_id
null
null
null
null
null
null
// Struct: UserFields // File: crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct UserFields
crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs
hyperswitch_connectors
struct_definition
UserFields
0
[]
47
null
null
null
null
null
null
null
// Implementation: impl PaymentSession for for Riskified // File: crates/hyperswitch_connectors/src/connectors/riskified.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl PaymentSession for for Riskified
crates/hyperswitch_connectors/src/connectors/riskified.rs
hyperswitch_connectors
impl_block
null
null
null
54
null
Riskified
PaymentSession for
0
0
null
null
// Implementation: impl DomainType for for T // File: crates/storage_impl/src/kv_router_store.rs // Module: storage_impl // Methods: 0 total (0 public) impl DomainType for for T
crates/storage_impl/src/kv_router_store.rs
storage_impl
impl_block
null
null
null
45
null
T
DomainType for
0
0
null
null
// Function: payments_connector_session // File: crates/router/src/routes/payments.rs // Module: router pub fn payments_connector_session( state: web::Data<app::AppState>, req: actix_web::HttpRequest, json_payload: web::Json<payment_types::PaymentsSessionRequest>, path: web::Path<common_utils::id_type::GlobalPaymentId>, ) -> impl Responder
crates/router/src/routes/payments.rs
router
function_signature
null
null
null
86
payments_connector_session
null
null
null
null
null
null
// Implementation: impl api::PaymentCapture for for Volt // File: crates/hyperswitch_connectors/src/connectors/volt.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::PaymentCapture for for Volt
crates/hyperswitch_connectors/src/connectors/volt.rs
hyperswitch_connectors
impl_block
null
null
null
55
null
Volt
api::PaymentCapture for
0
0
null
null
// Implementation: impl api::PaymentToken for for Sift // File: crates/hyperswitch_connectors/src/connectors/sift.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::PaymentToken for for Sift
crates/hyperswitch_connectors/src/connectors/sift.rs
hyperswitch_connectors
impl_block
null
null
null
57
null
Sift
api::PaymentToken for
0
0
null
null
// Function: get_item_price_id // File: crates/api_models/src/subscription.rs // Module: api_models pub fn get_item_price_id(&self) -> Result<String, error_stack::Report<ValidationError>>
crates/api_models/src/subscription.rs
api_models
function_signature
null
null
null
45
get_item_price_id
null
null
null
null
null
null
// Function: setup_mandate_preprocessing_steps // File: crates/router/src/core/payments/flows/setup_mandate_flow.rs // Module: router pub fn setup_mandate_preprocessing_steps<F: Clone>( state: &SessionState, router_data: &types::RouterData<F, types::SetupMandateRequestData, types::PaymentsResponseData>, confirm: bool, connector: &api::ConnectorData, ) -> RouterResult<types::RouterData<F, types::SetupMandateRequestData, types::PaymentsResponseData>>
crates/router/src/core/payments/flows/setup_mandate_flow.rs
router
function_signature
null
null
null
120
setup_mandate_preprocessing_steps
null
null
null
null
null
null
// Struct: LinkTokenRequest // File: crates/pm_auth/src/types.rs // Module: pm_auth // Implementations: 0 pub struct LinkTokenRequest
crates/pm_auth/src/types.rs
pm_auth
struct_definition
LinkTokenRequest
0
[]
35
null
null
null
null
null
null
null
// Struct: HelcimAuthType // File: crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct HelcimAuthType
crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs
hyperswitch_connectors
struct_definition
HelcimAuthType
0
[]
53
null
null
null
null
null
null
null
// File: crates/router/src/types/storage/invoice.rs // Module: router pub use diesel_models::invoice::{Invoice, InvoiceNew, InvoiceUpdate};
crates/router/src/types/storage/invoice.rs
router
full_file
null
null
null
32
null
null
null
null
null
null
null
// Struct: GooglePayDetails // File: crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct GooglePayDetails
crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs
hyperswitch_connectors
struct_definition
GooglePayDetails
0
[]
49
null
null
null
null
null
null
null
// Struct: PayoutRetrieveBody // File: crates/api_models/src/payouts.rs // Module: api_models // Implementations: 0 pub struct PayoutRetrieveBody
crates/api_models/src/payouts.rs
api_models
struct_definition
PayoutRetrieveBody
0
[]
39
null
null
null
null
null
null
null
// Implementation: impl api::Payment for for Deutschebank // File: crates/hyperswitch_connectors/src/connectors/deutschebank.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::Payment for for Deutschebank
crates/hyperswitch_connectors/src/connectors/deutschebank.rs
hyperswitch_connectors
impl_block
null
null
null
56
null
Deutschebank
api::Payment for
0
0
null
null
// Function: create_payment_method_metadata // File: crates/router/src/core/payments/tokenization.rs // Module: router pub fn create_payment_method_metadata( metadata: Option<&pii::SecretSerdeValue>, connector_token: Option<(String, String)
crates/router/src/core/payments/tokenization.rs
router
function_signature
null
null
null
55
create_payment_method_metadata
null
null
null
null
null
null
// Function: get_decrypted_response_payload // File: crates/router/src/core/payment_methods/transformers.rs // Module: router pub fn get_decrypted_response_payload( jwekey: &settings::Jwekey, jwe_body: encryption::JweBody, locker_choice: Option<api_enums::LockerChoice>, decryption_scheme: settings::DecryptionScheme, ) -> CustomResult<String, errors::VaultError>
crates/router/src/core/payment_methods/transformers.rs
router
function_signature
null
null
null
93
get_decrypted_response_payload
null
null
null
null
null
null
// Function: create_platform_account // File: crates/openapi/src/routes/platform.rs // Module: openapi pub fn create_platform_account()
crates/openapi/src/routes/platform.rs
openapi
function_signature
null
null
null
30
create_platform_account
null
null
null
null
null
null
// Implementation: impl ConnectorValidation for for Noon // File: crates/hyperswitch_connectors/src/connectors/noon.rs // Module: hyperswitch_connectors // Methods: 3 total (0 public) impl ConnectorValidation for for Noon
crates/hyperswitch_connectors/src/connectors/noon.rs
hyperswitch_connectors
impl_block
null
null
null
51
null
Noon
ConnectorValidation for
3
0
null
null
// Implementation: impl PaymentsPreProcessing for for Payme // File: crates/hyperswitch_connectors/src/connectors/payme.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl PaymentsPreProcessing for for Payme
crates/hyperswitch_connectors/src/connectors/payme.rs
hyperswitch_connectors
impl_block
null
null
null
55
null
Payme
PaymentsPreProcessing for
0
0
null
null
// Function: validate // File: crates/router/src/configs/validations.rs // Module: router pub fn validate(&self) -> Result<(), ApplicationError>
crates/router/src/configs/validations.rs
router
function_signature
null
null
null
35
validate
null
null
null
null
null
null
// Function: custom_error_handlers // File: crates/router/src/core/errors/error_handlers.rs // Module: router pub fn custom_error_handlers<B: body::MessageBody + 'static>( res: ServiceResponse<B>, ) -> actix_web::Result<ErrorHandlerResponse<B>>
crates/router/src/core/errors/error_handlers.rs
router
function_signature
null
null
null
58
custom_error_handlers
null
null
null
null
null
null
// Function: get_webhook_object_from_body // File: crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs // Module: hyperswitch_connectors pub fn get_webhook_object_from_body(body: &[u8]) -> CustomResult<Self, errors::ConnectorError>
crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
hyperswitch_connectors
function_signature
null
null
null
63
get_webhook_object_from_body
null
null
null
null
null
null
// Implementation: impl api::Payment for for Cryptopay // File: crates/hyperswitch_connectors/src/connectors/cryptopay.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::Payment for for Cryptopay
crates/hyperswitch_connectors/src/connectors/cryptopay.rs
hyperswitch_connectors
impl_block
null
null
null
59
null
Cryptopay
api::Payment for
0
0
null
null
// Function: verify_merchant_creds_for_applepay // File: crates/router/src/core/verification.rs // Module: router pub fn verify_merchant_creds_for_applepay( state: SessionState, body: verifications::ApplepayMerchantVerificationRequest, merchant_id: common_utils::id_type::MerchantId, profile_id: Option<common_utils::id_type::ProfileId>, ) -> CustomResult<services::ApplicationResponse<ApplepayMerchantResponse>, errors::ApiErrorResponse>
crates/router/src/core/verification.rs
router
function_signature
null
null
null
107
verify_merchant_creds_for_applepay
null
null
null
null
null
null
// File: crates/diesel_models/src/payment_link.rs // Module: diesel_models // Public structs: 2 use common_utils::types::MinorUnit; use diesel::{Identifiable, Insertable, Queryable, Selectable}; use serde::{self, Deserialize, Serialize}; use time::PrimitiveDateTime; use crate::{enums as storage_enums, schema::payment_link}; #[derive(Clone, Debug, Identifiable, Queryable, Selectable, Serialize, Deserialize)] #[diesel(table_name = payment_link, primary_key(payment_link_id), check_for_backend(diesel::pg::Pg))] pub struct PaymentLink { pub payment_link_id: String, pub payment_id: common_utils::id_type::PaymentId, pub link_to_pay: String, pub merchant_id: common_utils::id_type::MerchantId, pub amount: MinorUnit, pub currency: Option<storage_enums::Currency>, #[serde(with = "common_utils::custom_serde::iso8601")] pub created_at: PrimitiveDateTime, #[serde(with = "common_utils::custom_serde::iso8601")] pub last_modified_at: PrimitiveDateTime, #[serde(with = "common_utils::custom_serde::iso8601::option")] pub fulfilment_time: Option<PrimitiveDateTime>, pub custom_merchant_name: Option<String>, pub payment_link_config: Option<serde_json::Value>, pub description: Option<String>, pub profile_id: Option<common_utils::id_type::ProfileId>, pub secure_link: Option<String>, } #[derive( Clone, Debug, Eq, PartialEq, Insertable, serde::Serialize, serde::Deserialize, router_derive::DebugAsDisplay, )] #[diesel(table_name = payment_link)] pub struct PaymentLinkNew { pub payment_link_id: String, pub payment_id: common_utils::id_type::PaymentId, pub link_to_pay: String, pub merchant_id: common_utils::id_type::MerchantId, pub amount: MinorUnit, pub currency: Option<storage_enums::Currency>, #[serde(with = "common_utils::custom_serde::iso8601::option")] pub created_at: Option<PrimitiveDateTime>, #[serde(with = "common_utils::custom_serde::iso8601::option")] pub last_modified_at: Option<PrimitiveDateTime>, #[serde(with = "common_utils::custom_serde::iso8601::option")] pub fulfilment_time: Option<PrimitiveDateTime>, pub custom_merchant_name: Option<String>, pub payment_link_config: Option<serde_json::Value>, pub description: Option<String>, pub profile_id: Option<common_utils::id_type::ProfileId>, pub secure_link: Option<String>, }
crates/diesel_models/src/payment_link.rs
diesel_models
full_file
null
null
null
599
null
null
null
null
null
null
null
// Struct: ProxyResponse // File: crates/api_models/src/proxy.rs // Module: api_models // Implementations: 1 // Traits: common_utils::events::ApiEventMetric pub struct ProxyResponse
crates/api_models/src/proxy.rs
api_models
struct_definition
ProxyResponse
1
[ "common_utils::events::ApiEventMetric" ]
46
null
null
null
null
null
null
null
// Function: drainer_stream // File: crates/drainer/src/stream.rs // Module: drainer pub fn drainer_stream(&self, shard_key: &str) -> String
crates/drainer/src/stream.rs
drainer
function_signature
null
null
null
39
drainer_stream
null
null
null
null
null
null
// Struct: CybersourcePaymentsIncrementalAuthorizationRequest // File: crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct CybersourcePaymentsIncrementalAuthorizationRequest
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
hyperswitch_connectors
struct_definition
CybersourcePaymentsIncrementalAuthorizationRequest
0
[]
59
null
null
null
null
null
null
null
// Implementation: impl ApiClient for for ProxyClient // File: crates/router/src/services/api/client.rs // Module: router // Methods: 6 total (0 public) impl ApiClient for for ProxyClient
crates/router/src/services/api/client.rs
router
impl_block
null
null
null
44
null
ProxyClient
ApiClient for
6
0
null
null
// Implementation: impl api::PaymentSession for for Payeezy // File: crates/hyperswitch_connectors/src/connectors/payeezy.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::PaymentSession for for Payeezy
crates/hyperswitch_connectors/src/connectors/payeezy.rs
hyperswitch_connectors
impl_block
null
null
null
60
null
Payeezy
api::PaymentSession for
0
0
null
null
// Struct: XenditWebhookEvent // File: crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct XenditWebhookEvent
crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs
hyperswitch_connectors
struct_definition
XenditWebhookEvent
0
[]
54
null
null
null
null
null
null
null
// Implementation: impl Origin // File: crates/router/src/types/domain/user/decision_manager.rs // Module: router // Methods: 1 total (0 public) impl Origin
crates/router/src/types/domain/user/decision_manager.rs
router
impl_block
null
null
null
37
null
Origin
null
1
0
null
null
// Struct: ProdIntent // File: crates/api_models/src/user/dashboard_metadata.rs // Module: api_models // Implementations: 0 pub struct ProdIntent
crates/api_models/src/user/dashboard_metadata.rs
api_models
struct_definition
ProdIntent
0
[]
35
null
null
null
null
null
null
null
// Implementation: impl Paysafe // File: crates/hyperswitch_connectors/src/connectors/paysafe.rs // Module: hyperswitch_connectors // Methods: 1 total (1 public) impl Paysafe
crates/hyperswitch_connectors/src/connectors/paysafe.rs
hyperswitch_connectors
impl_block
null
null
null
46
null
Paysafe
null
1
1
null
null
// Struct: Bankofamerica // File: crates/hyperswitch_connectors/src/connectors/bankofamerica.rs // Module: hyperswitch_connectors // Implementations: 18 // Traits: api::Payment, api::PaymentSession, api::ConnectorAccessToken, api::MandateSetup, api::PaymentAuthorize, api::PaymentSync, api::PaymentCapture, api::PaymentVoid, api::Refund, api::RefundExecute, api::RefundSync, api::PaymentToken, ConnectorCommon, ConnectorValidation, webhooks::IncomingWebhook, ConnectorSpecifications pub struct Bankofamerica
crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
hyperswitch_connectors
struct_definition
Bankofamerica
18
[ "api::Payment", "api::PaymentSession", "api::ConnectorAccessToken", "api::MandateSetup", "api::PaymentAuthorize", "api::PaymentSync", "api::PaymentCapture", "api::PaymentVoid", "api::Refund", "api::RefundExecute", "api::RefundSync", "api::PaymentToken", "ConnectorCommon", "ConnectorValidation", "webhooks::IncomingWebhook", "ConnectorSpecifications" ]
132
null
null
null
null
null
null
null
// Struct: AmountDetails // File: crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct AmountDetails
crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs
hyperswitch_connectors
struct_definition
AmountDetails
0
[]
48
null
null
null
null
null
null
null
// Function: validate_payment_method_data_against_payment_method // File: crates/api_models/src/payment_methods.rs // Module: api_models pub fn validate_payment_method_data_against_payment_method( payment_method_type: api_enums::PaymentMethod, payment_method_data: PaymentMethodCreateData, ) -> bool
crates/api_models/src/payment_methods.rs
api_models
function_signature
null
null
null
66
validate_payment_method_data_against_payment_method
null
null
null
null
null
null
// Function: begin_totp // File: crates/router/src/core/user.rs // Module: router pub fn begin_totp( state: SessionState, user_token: auth::UserFromSinglePurposeToken, ) -> UserResponse<user_api::BeginTotpResponse>
crates/router/src/core/user.rs
router
function_signature
null
null
null
59
begin_totp
null
null
null
null
null
null
// Struct: PaysafeAuthType // File: crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct PaysafeAuthType
crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs
hyperswitch_connectors
struct_definition
PaysafeAuthType
0
[]
50
null
null
null
null
null
null
null
// Struct: Config // File: crates/diesel_models/src/configs.rs // Module: diesel_models // Implementations: 0 pub struct Config
crates/diesel_models/src/configs.rs
diesel_models
struct_definition
Config
0
[]
33
null
null
null
null
null
null
null
// Implementation: impl PaymentId // File: crates/common_utils/src/id_type/payment.rs // Module: common_utils // Methods: 8 total (8 public) impl PaymentId
crates/common_utils/src/id_type/payment.rs
common_utils
impl_block
null
null
null
38
null
PaymentId
null
8
8
null
null
// Struct: CeleroErrorResponse // File: crates/hyperswitch_connectors/src/connectors/celero/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct CeleroErrorResponse
crates/hyperswitch_connectors/src/connectors/celero/transformers.rs
hyperswitch_connectors
struct_definition
CeleroErrorResponse
0
[]
48
null
null
null
null
null
null
null
// Struct: FrmPaymentMethodType // File: crates/api_models/src/admin.rs // Module: api_models // Implementations: 0 pub struct FrmPaymentMethodType
crates/api_models/src/admin.rs
api_models
struct_definition
FrmPaymentMethodType
0
[]
37
null
null
null
null
null
null
null
// Implementation: impl api::MandateSetup for for Payload // File: crates/hyperswitch_connectors/src/connectors/payload.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::MandateSetup for for Payload
crates/hyperswitch_connectors/src/connectors/payload.rs
hyperswitch_connectors
impl_block
null
null
null
59
null
Payload
api::MandateSetup for
0
0
null
null
// Struct: AciCaptureRequest // File: crates/hyperswitch_connectors/src/connectors/aci/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct AciCaptureRequest
crates/hyperswitch_connectors/src/connectors/aci/transformers.rs
hyperswitch_connectors
struct_definition
AciCaptureRequest
0
[]
49
null
null
null
null
null
null
null
// Function: validated_limit // File: crates/api_models/src/routing.rs // Module: api_models pub fn validated_limit(&self) -> u32
crates/api_models/src/routing.rs
api_models
function_signature
null
null
null
34
validated_limit
null
null
null
null
null
null
// Function: as_str // File: crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs // Module: hyperswitch_connectors pub fn as_str(&self) -> &str
crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs
hyperswitch_connectors
function_signature
null
null
null
45
as_str
null
null
null
null
null
null
// Implementation: impl api::PaymentSession for for Rapyd // File: crates/hyperswitch_connectors/src/connectors/rapyd.rs // Module: hyperswitch_connectors // Methods: 0 total (0 public) impl api::PaymentSession for for Rapyd
crates/hyperswitch_connectors/src/connectors/rapyd.rs
hyperswitch_connectors
impl_block
null
null
null
60
null
Rapyd
api::PaymentSession for
0
0
null
null
// Struct: CountAccumulator // File: crates/analytics/src/active_payments/accumulator.rs // Module: analytics // Implementations: 1 // Traits: ActivePaymentsMetricAccumulator pub struct CountAccumulator
crates/analytics/src/active_payments/accumulator.rs
analytics
struct_definition
CountAccumulator
1
[ "ActivePaymentsMetricAccumulator" ]
50
null
null
null
null
null
null
null
// Struct: CaptureBuyerResponse // File: crates/hyperswitch_connectors/src/connectors/payme/transformers.rs // Module: hyperswitch_connectors // Implementations: 0 pub struct CaptureBuyerResponse
crates/hyperswitch_connectors/src/connectors/payme/transformers.rs
hyperswitch_connectors
struct_definition
CaptureBuyerResponse
0
[]
49
null
null
null
null
null
null
null
// Implementation: impl GlobalPaymentId // File: crates/common_utils/src/id_type/global_id/payment.rs // Module: common_utils // Methods: 4 total (4 public) impl GlobalPaymentId
crates/common_utils/src/id_type/global_id/payment.rs
common_utils
impl_block
null
null
null
42
null
GlobalPaymentId
null
4
4
null
null