text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
impl MerchantAccountInterface for KafkaStore {
async fn insert_merchant(
&self,
state: &KeyManagerState,
merchant_account: domain::MerchantAccount,
key_store: &domain::MerchantKeyStore,
) -> CustomResult<domain::MerchantAccount, errors::StorageError> {
self.diesel_store
... | crates/router/src/db/kafka_store.rs | router | impl_block | 856 | rust | null | KafkaStore | MerchantAccountInterface for | impl MerchantAccountInterface for for KafkaStore | null | null | null | null | null | null | null | null |
pub struct ZenWebhookEventType {
#[serde(rename = "type")]
pub transaction_type: ZenWebhookTxnType,
pub transaction_id: String,
pub status: ZenPaymentStatus,
} | crates/hyperswitch_connectors/src/connectors/zen/transformers.rs | hyperswitch_connectors | struct_definition | 43 | rust | ZenWebhookEventType | null | null | null | null | null | null | null | null | null | null | null |
/// Routing Algorithm specific to merchants
pub struct MerchantRoutingAlgorithm {
#[schema(value_type = String)]
pub id: common_utils::id_type::RoutingId,
#[schema(value_type = String)]
pub profile_id: common_utils::id_type::ProfileId,
pub name: String,
pub description: String,
pub algorithm... | crates/api_models/src/routing.rs | api_models | struct_definition | 103 | rust | MerchantRoutingAlgorithm | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> HeaderMapStruct<'a> {
pub fn new(headers: &'a HeaderMap) -> Self {
HeaderMapStruct { headers }
}
fn get_mandatory_header_value_by_key(
&self,
key: &str,
) -> Result<&str, error_stack::Report<errors::ApiErrorResponse>> {
self.headers
.get(key)
... | crates/router/src/services/authentication.rs | router | impl_block | 756 | rust | null | HeaderMapStruct | null | impl HeaderMapStruct | null | null | null | null | null | null | null | null |
pub struct Discount {
#[serde(rename = "type")]
pub discount_type: DiscountType,
pub discount_one: Option<DiscountObject>,
pub discount_two: Option<DiscountObject>,
pub discount_three: Option<DiscountObject>,
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | Discount | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Bluesnap {} | crates/hyperswitch_connectors/src/connectors/bluesnap.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Bluesnap | api::PaymentCapture for | impl api::PaymentCapture for for Bluesnap | null | null | null | null | null | null | null | null |
impl api::RefundSync for Hipay {} | crates/hyperswitch_connectors/src/connectors/hipay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Hipay | api::RefundSync for | impl api::RefundSync for for Hipay | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Nmi {} | crates/hyperswitch_connectors/src/connectors/nmi.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Nmi | api::PaymentVoid for | impl api::PaymentVoid for for Nmi | null | null | null | null | null | null | null | null |
pub struct AuthenticationData {
pub merchant_account: domain::MerchantAccount,
pub platform_merchant_account: Option<domain::MerchantAccount>,
pub key_store: domain::MerchantKeyStore,
pub profile_id: Option<id_type::ProfileId>,
} | crates/router/src/services/authentication.rs | router | struct_definition | 54 | rust | AuthenticationData | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Stax {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&STAX_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*STAX_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_web... | crates/hyperswitch_connectors/src/connectors/stax.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Stax | ConnectorSpecifications for | impl ConnectorSpecifications for for Stax | null | null | null | null | null | null | null | null |
pub struct XenditSplitResponse {
id: String,
name: String,
description: String,
routes: Vec<XenditSplitRoute>,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | XenditSplitResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundsResponseData {
pub connector_refund_id: String,
pub refund_status: common_enums::RefundStatus,
// pub amount_received: Option<i32>, // Calculation for amount received not in place yet
} | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | struct_definition | 51 | rust | RefundsResponseData | null | null | null | null | null | null | null | null | null | null | null |
impl Worldpayvantiv {
pub fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs | hyperswitch_connectors | impl_block | 35 | rust | null | Worldpayvantiv | null | impl Worldpayvantiv | null | null | null | null | null | null | null | null |
pub struct EncryptionCreateRequest {
#[serde(flatten)]
pub identifier: Identifier,
} | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 19 | rust | EncryptionCreateRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Moneris {} | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Moneris | api::PaymentCapture for | impl api::PaymentCapture for for Moneris | null | null | null | null | null | null | null | null |
pub async fn retrieve_customer(
state: SessionState,
merchant_context: domain::MerchantContext,
_profile_id: Option<id_type::ProfileId>,
customer_id: id_type::CustomerId,
) -> errors::CustomerResponse<customers::CustomerResponse> {
let db = state.store.as_ref();
let key_manager_state = &(&state)... | crates/router/src/core/customers.rs | router | function_signature | 263 | rust | null | null | null | null | retrieve_customer | null | null | null | null | null | null | null |
pub async fn delete_disputes(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Vec<Dispute>> {
let query = diesel::delete(<Dispute>::table())
.filter(dispute_dsl::merchant_id.eq(merchant_id.to_owned()))
.filter(dispute_dsl::dispute_id.like("test_%"));
... | crates/diesel_models/src/query/user/sample_data.rs | diesel_models | function_signature | 220 | rust | null | null | null | null | delete_disputes | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Getnet {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&GETNET_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*GETNET_SUPPORTED_PAYMENT_METHODS)
}
fn get_support... | crates/hyperswitch_connectors/src/connectors/getnet.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Getnet | ConnectorSpecifications for | impl ConnectorSpecifications for for Getnet | null | null | null | null | null | null | null | null |
pub struct PaypalThreeDsParams {
pub liability_shift: LiabilityShift,
pub three_d_secure: ThreeDsCheck,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | PaypalThreeDsParams | null | null | null | null | null | null | null | null | null | null | null |
pub struct CoinbaseWebhookDetails {
pub attempt_number: i64,
pub event: Event,
pub id: String,
pub scheduled_for: String,
} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 36 | rust | CoinbaseWebhookDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct Sift {
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | struct_definition | 27 | rust | Sift | null | null | null | null | null | null | null | null | null | null | null |
pub struct ErrorResponse {
#[serde(rename = "type")]
#[schema(
example = "invalid_request",
value_type = &'static str
)]
pub error_type: &'static str,
#[schema(
example = "Missing required param: {param}",
value_type = String
)]
pub message: String,
#[sche... | crates/api_models/src/errors/types.rs | api_models | struct_definition | 150 | rust | ErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn call_to_locker(
state: &SessionState,
payment_methods: Vec<domain::PaymentMethod>,
customer_id: &id_type::CustomerId,
merchant_id: &id_type::MerchantId,
merchant_context: &domain::MerchantContext,
) -> CustomResult<usize, errors::ApiErrorResponse> {
let mut cards_moved = 0;
for... | crates/router/src/core/locker_migration.rs | router | function_signature | 700 | rust | null | null | null | null | call_to_locker | null | null | null | null | null | null | null |
pub async fn fetch_merchant_account_for_network_token_webhooks(
state: &SessionState,
merchant_id: &id_type::MerchantId,
) -> RouterResult<domain::MerchantContext> {
let db = &*state.store;
let key_manager_state = &(state).into();
let key_store = state
.store()
.get_merchant_key_sto... | crates/router/src/core/webhooks/network_tokenization_incoming.rs | router | function_signature | 241 | rust | null | null | null | null | fetch_merchant_account_for_network_token_webhooks | null | null | null | null | null | null | null |
impl api::PaymentSession for Datatrans {} | crates/hyperswitch_connectors/src/connectors/datatrans.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Datatrans | api::PaymentSession for | impl api::PaymentSession for for Datatrans | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Vgs {} | crates/hyperswitch_connectors/src/connectors/vgs.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Vgs | api::RefundExecute for | impl api::RefundExecute for for Vgs | null | null | null | null | null | null | null | null |
pub struct CardData {
name: Option<Secret<String>>,
expiry_month: Option<Secret<String>>,
expiry_year: Option<Secret<String>>,
card_type: String,
last_four: Secret<String>,
card_bin: Option<Secret<String>>,
avs_result: String,
cvd_result: String,
cavv_result: Option<String>,
addr... | crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs | hyperswitch_connectors | struct_definition | 104 | rust | CardData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Airwallex {} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Airwallex | api::PaymentCapture for | impl api::PaymentCapture for for Airwallex | null | null | null | null | null | null | null | null |
&auth::JWTAuth {
permission: Permission::ProfileReportRead,
},
api_locking::LockAction::NotApplicable,
))
.await
}
#[cfg(feature = "v1")]
pub async fn generate_merchant_authentication_report(
state: web::Data<AppState>,
req... | crates/router/src/analytics.rs#chunk2 | router | chunk | 7,809 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/checkout.rs
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct CheckoutTest;
impl ConnectorActions for CheckoutTest {}
impl utils::Connector for CheckoutTest... | crates/router/tests/connectors/checkout.rs | router | full_file | 3,015 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_pm_collect_db_entry(
state: &SessionState,
merchant_context: &domain::MerchantContext,
pm_collect_link_data: &PaymentMethodCollectLinkData,
return_url: Option<String>,
) -> RouterResult<PaymentMethodCollectLink> {
let db: &dyn StorageInterface = &*state.store;
let link_data ... | crates/router/src/core/payment_methods.rs | router | function_signature | 297 | rust | null | null | null | null | create_pm_collect_db_entry | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id_payment_id_connector_dispute_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
payment_id: &common_utils::id_type::PaymentId,
connector_dispute_id: &str,
) -> StorageResult<Option<Self>> {
generics::generic_find_one_opt... | crates/diesel_models/src/query/dispute.rs | diesel_models | function_signature | 149 | rust | null | null | null | null | find_by_merchant_id_payment_id_connector_dispute_id | null | null | null | null | null | null | null |
impl api::Payment for Hyperwallet {} | crates/hyperswitch_connectors/src/connectors/hyperwallet.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Hyperwallet | api::Payment for | impl api::Payment for for Hyperwallet | null | null | null | null | null | null | null | null |
pub fn inner(&self) -> &T {
&self.0
} | crates/hyperswitch_domain_models/src/type_encryption.rs | hyperswitch_domain_models | function_signature | 18 | rust | null | null | null | null | inner | null | null | null | null | null | null | null |
pub struct StripeCard {
pub number: cards::CardNumber,
pub exp_month: masking::Secret<String>,
pub exp_year: masking::Secret<String>,
pub cvc: masking::Secret<String>,
pub holder_name: Option<masking::Secret<String>>,
} | crates/router/src/compatibility/stripe/payment_intents/types.rs | router | struct_definition | 58 | rust | StripeCard | null | null | null | null | null | null | null | null | null | null | null |
state,
req_state,
merchant_context,
&profile,
operation,
payment_sync_request,
get_tracker_response,
call_connector_action,
HeaderPayload::default(),
))
... | crates/router/src/core/payments.rs#chunk3 | router | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlacetopayError {
pub status: PlacetopayErrorStatus,
pub message: String,
pub reason: String,
} | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | hyperswitch_connectors | struct_definition | 32 | rust | PlacetopayError | null | null | null | null | null | null | null | null | null | null | null |
pub struct MifinityRouterData<T> {
pub amount: StringMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | MifinityRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub fn is_key_deleted(&self) -> bool {
matches!(self, Self::KeyDeleted)
} | crates/redis_interface/src/types.rs | redis_interface | function_signature | 23 | rust | null | null | null | null | is_key_deleted | null | null | null | null | null | null | null |
File: crates/router/src/locale.rs
use rust_i18n::i18n;
i18n!("locales", fallback = "en");
| crates/router/src/locale.rs | router | full_file | 32 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Returns customer_user_agent_extended with customer_user_agent as fallback
pub fn get_user_agent_extended(&self) -> Option<String> {
self.customer_user_agent_extended
.clone()
.or_else(|| self.customer_user_agent.clone())
} | crates/diesel_models/src/mandate.rs | diesel_models | function_signature | 52 | rust | null | null | null | null | get_user_agent_extended | null | null | null | null | null | null | null |
pub fn add_negative_filter_clause(
&mut self,
key: impl ToSql<T>,
value: impl ToSql<T>,
) -> QueryResult<()> {
self.add_custom_filter_clause(key, value, FilterTypes::NotEqual)
} | crates/analytics/src/query.rs | analytics | function_signature | 53 | rust | null | null | null | null | add_negative_filter_clause | null | null | null | null | null | null | null |
pub const fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
amount_converter_webhooks: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/braintree.rs | hyperswitch_connectors | function_signature | 42 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub fn get_merchant_id(&self) -> id_type::MerchantId {
self.merchant_id.clone()
} | crates/router/src/types/domain/user.rs | router | function_signature | 25 | rust | null | null | null | null | get_merchant_id | null | null | null | null | null | null | null |
impl MandateNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Mandate> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/mandate.rs | diesel_models | impl_block | 42 | rust | null | MandateNew | null | impl MandateNew | null | null | null | null | null | null | null | null |
pub async fn call_update_gateway_score_open_router(
state: web::Data<AppState>,
req: HttpRequest,
payload: web::Json<api_models::open_router::UpdateScorePayload>,
) -> impl Responder {
let flow = Flow::DecisionEngineGatewayFeedbackCall;
Box::pin(oss_api::server_wrap(
flow,
state,
... | crates/router/src/routes/routing.rs | router | function_signature | 152 | rust | null | null | null | null | call_update_gateway_score_open_router | null | null | null | null | null | null | null |
impl Shift4AuthorizePreprocessingCommon for PaymentsAuthorizeData {
fn get_email_optional(&self) -> Option<pii::Email> {
self.email.clone()
}
fn get_complete_authorize_url(&self) -> Option<String> {
self.complete_authorize_url.clone()
}
fn get_currency_required(
&self,
... | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | impl_block | 226 | rust | null | PaymentsAuthorizeData | Shift4AuthorizePreprocessingCommon for | impl Shift4AuthorizePreprocessingCommon for for PaymentsAuthorizeData | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Authorizedotnet {} | crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Authorizedotnet | api::PaymentToken for | impl api::PaymentToken for for Authorizedotnet | null | null | null | null | null | null | null | null |
pub struct ApplePayTokenizedCard {
transaction_type: TransactionType,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | ApplePayTokenizedCard | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Inespay {
//TODO: implement functions when support enabled
} | crates/hyperswitch_connectors/src/connectors/inespay.rs | hyperswitch_connectors | impl_block | 19 | rust | null | Inespay | ConnectorValidation for | impl ConnectorValidation for for Inespay | null | null | null | null | null | null | null | null |
File: crates/connector_configs/src/connector.rs
Public functions: 5
Public structs: 9
use std::collections::HashMap;
#[cfg(feature = "payouts")]
use api_models::enums::PayoutConnectors;
use api_models::{
enums::{AuthenticationConnectors, Connector, PmAuthConnectors, TaxConnectors},
payments,
};
use serde::{... | crates/connector_configs/src/connector.rs | connector_configs | full_file | 5,775 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiCompleteResponse {
pub response: Response,
pub responsetext: String,
pub authcode: Option<String>,
pub transactionid: String,
pub avsresponse: Option<String>,
pub cvvresponse: Option<String>,
pub orderid: String,
pub response_code: String,
customer_vault_id: Option<Secr... | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 81 | rust | NmiCompleteResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Facilitapay {} | crates/hyperswitch_connectors/src/connectors/facilitapay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Facilitapay | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Facilitapay | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/opayo.rs
Public functions: 1
Public structs: 1
mod transformers;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
types::{AmountConvertor, MinorUnit,... | crates/hyperswitch_connectors/src/connectors/opayo.rs | hyperswitch_connectors | full_file | 4,395 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BacsBankTransferAdditionalData
{
"type": "object",
"description": "Masked payout method details for bacs bank transfer payout method",
"required": [
"bank_sort_code",
"bank_account_number"
],
"properties": {
"bank_sort_code": {
"type": "string",
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 269 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BacsBankTransferAdditionalData"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.ListBlocklistQuery
{
"type": "object",
"required": [
"data_kind"
],
"properties": {
"data_kind": {
"$ref": "#/components/schemas/BlocklistDataKind"
},
"limit": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"offset":... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 124 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ListBlocklistQuery"
] | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/barclaycard.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub async fn add_api_key(
state: &SessionState,
api_key: Secret<String>,
merchant_id: common_utils::id_type::MerchantId,
key_id: common_utils::id_type::ApiKeyId,
expiry: Option<u64>,
) -> CustomResult<(), ApiClientError> {
let decision_config = if let Some(config) = &state.conf.decision {
... | crates/router/src/services/authentication/decision.rs | router | function_signature | 168 | rust | null | null | null | null | add_api_key | null | null | null | null | null | null | null |
pub struct BillingInformation {
first_name: Secret<String>,
last_name: Secret<String>,
address_1: Secret<String>,
address_2: Secret<String>,
city: Secret<String>,
postal_code: Secret<String>,
province: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs | hyperswitch_connectors | struct_definition | 55 | rust | BillingInformation | null | null | null | null | null | null | null | null | null | null | null |
pub trait VerifyConnector {
async fn verify(
state: &SessionState,
connector_data: VerifyConnectorData,
) -> errors::RouterResponse<()> {
let authorize_data = connector_data.get_payment_authorize_data();
let access_token = Self::get_access_token(state, connector_data.clone()).awa... | crates/router/src/types/api/verify_connector.rs | router | trait_definition | 590 | rust | null | null | VerifyConnector | null | null | null | null | null | null | null | null | null |
pub struct HyperwalletCard {
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
complete: bool,
} | crates/hyperswitch_connectors/src/connectors/hyperwallet/transformers.rs | hyperswitch_connectors | struct_definition | 41 | rust | HyperwalletCard | null | null | null | null | null | null | null | null | null | null | null |
impl Braintree {
pub const fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
amount_converter_webhooks: &StringMinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/braintree.rs | hyperswitch_connectors | impl_block | 48 | rust | null | Braintree | null | impl Braintree | null | null | null | null | null | null | null | null |
/// Default constructor.
pub fn new() -> Result<Self, config::ConfigError> {
Self::new_with_config_path(None)
} | crates/router_env/src/logger/config.rs | router_env | function_signature | 30 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub async fn terminate_auth_select(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<user_api::AuthSelectRequest>,
) -> HttpResponse {
let flow = Flow::AuthSelect;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
json_payload.into_inner(),
... | crates/router/src/routes/user.rs | router | function_signature | 129 | rust | null | null | null | null | terminate_auth_select | null | null | null | null | null | null | null |
pub fn calculate_signature(
signature_data: String,
) -> Result<Secret<String>, Report<errors::ConnectorError>> {
let message = signature_data.as_bytes();
let encoded_data = hex::encode(
crypto::Md5
.generate_digest(message)
.change_context(errors::ConnectorError::RequestEnco... | crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs | hyperswitch_connectors | function_signature | 82 | rust | null | null | null | null | calculate_signature | null | null | null | null | null | null | null |
pub async fn get_domain_info(
domain: AnalyticsDomain,
) -> crate::errors::AnalyticsResult<GetInfoResponse> {
let info = match domain {
AnalyticsDomain::Payments => GetInfoResponse {
metrics: utils::get_payment_metrics_info(),
download_dimensions: None,
dimensions: ut... | crates/analytics/src/core.rs | analytics | function_signature | 394 | rust | null | null | null | null | get_domain_info | null | null | null | null | null | null | null |
impl<Req> RoutingEventsWrapper<Req>
where
Req: Serialize + Clone,
{
#[allow(clippy::too_many_arguments)]
pub fn new(
tenant_id: id_type::TenantId,
request_id: Option<RequestId>,
payment_id: String,
profile_id: id_type::ProfileId,
merchant_id: id_type::MerchantId,
... | crates/router/src/core/payments/routing/utils.rs | router | impl_block | 884 | rust | null | RoutingEventsWrapper | null | impl RoutingEventsWrapper | null | null | null | null | null | null | null | null |
pub struct ExternalSchemeDetails {
transaction_id: Secret<String>, // This is sensitive information
brand: Option<CardNetwork>,
} | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 27 | rust | ExternalSchemeDetails | null | null | null | null | null | null | null | null | null | null | null |
impl MerchantAccountUpdateInternal {
pub fn apply_changeset(self, source: MerchantAccount) -> MerchantAccount {
let Self {
merchant_name,
merchant_details,
return_url,
webhook_details,
sub_merchants_enabled,
parent_merchant_id,
... | crates/diesel_models/src/merchant_account.rs | diesel_models | impl_block | 611 | rust | null | MerchantAccountUpdateInternal | null | impl MerchantAccountUpdateInternal | null | null | null | null | null | null | null | null |
impl ApiKeys {
pub fn server(state: AppState) -> Scope {
web::scope("/v2/api-keys")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::post().to(api_keys::api_key_create)))
.service(web::resource("/list").route(web::get().to(api_keys::api_key_list)))
... | crates/router/src/routes/app.rs | router | impl_block | 142 | rust | null | ApiKeys | null | impl ApiKeys | null | null | null | null | null | null | null | null |
pub struct PaypalVault {
store_in_vault: StoreInVault,
usage_type: UsageType,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | PaypalVault | null | null | null | null | null | null | null | null | null | null | null |
pub struct BillingConnectorPaymentDetails {
/// Payment Processor Token to process the Revenue Recovery Payment
pub payment_processor_token: String,
/// Billing Connector's Customer Id
pub connector_customer_id: String,
} | crates/diesel_models/src/types.rs | diesel_models | struct_definition | 44 | rust | BillingConnectorPaymentDetails | null | null | null | null | null | null | null | null | null | null | null |
- Add logging to the response for stripe compatibility layer ([#1470](https://github.com/juspay/hyperswitch/pull/1470)) ([`96c71e1`](https://github.com/juspay/hyperswitch/commit/96c71e1b1bbf2b67a6e2c87478b98bcbb7cdb3ef))
- **router:**
- Implement `CardsInfoInterface` for `MockDB` ([#1262](https://github.com/juspay/... | CHANGELOG.md#chunk59 | null | doc_chunk | 8,118 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/payu/transformers.rs
Public structs: 25
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts::BASE64_ENGINE,
pii::{Email, IpAddress},
types::MinorUnit,
};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_d... | crates/hyperswitch_connectors/src/connectors/payu/transformers.rs | hyperswitch_connectors | full_file | 4,782 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Generate Authentication Id from prefix
pub fn generate_authentication_id(prefix: &'static str) -> Self {
Self(crate::generate_ref_id_with_default_length(prefix))
} | crates/common_utils/src/id_type/authentication.rs | common_utils | function_signature | 36 | rust | null | null | null | null | generate_authentication_id | null | null | null | null | null | null | null |
pub struct GetnetAuthType {
pub username: Secret<String>,
pub password: Secret<String>,
pub merchant_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | GetnetAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct SubsequentAuthInformation {
original_network_trans_id: Secret<String>,
// original_auth_amount: String, Required for Discover, Diners Club, JCB, and China Union Pay transactions.
reason: Reason,
} | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 47 | rust | SubsequentAuthInformation | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_secret(&self) -> Secret<String> {
self.0.clone()
} | crates/router/src/types/domain/user.rs | router | function_signature | 20 | rust | null | null | null | null | get_secret | null | null | null | null | null | null | null |
File: crates/router/tests/utils.rs
Public functions: 10
Public structs: 12
#![allow(
dead_code,
clippy::expect_used,
clippy::missing_panics_doc,
clippy::unwrap_used
)]
use actix_http::{body::MessageBody, Request};
use actix_web::{
dev::{Service, ServiceResponse},
test::{call_and_read_body_js... | crates/router/tests/utils.rs | router | full_file | 2,963 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlainCardDetails {
#[serde(rename = "type")]
pub res_type: String,
pub number: cards::CardNumber,
pub expiry_month: Secret<String>,
pub expiry_year: Secret<String>,
pub cvv: Secret<String>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "3D")]
pub three... | crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs | hyperswitch_connectors | struct_definition | 90 | rust | PlainCardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_card_info(
state: routes::SessionState,
card_info_request: cards_info_api_types::CardInfoCreateRequest,
) -> RouterResponse<cards_info_api_types::CardInfoResponse> {
let db = state.store.as_ref();
cards_info::CardsInfoInterface::add_card_info(db, card_info_request.foreign_into())
... | crates/router/src/core/cards_info.rs | router | function_signature | 130 | rust | null | null | null | null | create_card_info | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payment-methods/paymentmethods--create.mdx
# Type: Doc File
---
openapi: post /payment_methods
--- | api-reference/v1/payment-methods/paymentmethods--create.mdx | null | doc_file | 32 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct StaxTokenizeData {
person_name: Secret<String>,
card_number: cards::CardNumber,
card_exp: Secret<String>,
card_cvv: Secret<String>,
customer_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/stax/transformers.rs | hyperswitch_connectors | struct_definition | 47 | rust | StaxTokenizeData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_id(&self) -> id_type::MerchantConnectorAccountId {
self.id.clone()
} | crates/diesel_models/src/merchant_connector_account.rs | diesel_models | function_signature | 22 | rust | null | null | null | null | get_id | null | null | null | null | null | null | null |
Documentation: api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx
# Type: Doc File
---
openapi: post /v2/payment-method-sessions/{id}/confirm
--- | api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx | null | doc_file | 45 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payment_intents.rs
pub mod accumulator;
mod core;
pub mod filters;
pub mod metrics;
pub mod sankey;
pub mod types;
pub use accumulator::{PaymentIntentMetricAccumulator, PaymentIntentMetricsAccumulator};
pub trait PaymentIntentAnalytics:
metrics::PaymentIntentMetricAnalytics + filters::P... | crates/analytics/src/payment_intents.rs | analytics | full_file | 92 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantAccount {
pub merchant_name: Option<Encryption>,
pub merchant_details: Option<Encryption>,
pub publishable_key: Option<String>,
pub storage_scheme: storage_enums::MerchantStorageScheme,
pub metadata: Option<pii::SecretSerdeValue>,
pub created_at: time::PrimitiveDateTime,
p... | crates/diesel_models/src/merchant_account.rs | diesel_models | struct_definition | 169 | rust | MerchantAccount | null | null | null | null | null | null | null | null | null | null | null |
pub fn open_router_config_default() -> Self {
Self {
elimination_analyser_config: None,
params: None,
decision_engine_configs: Some(open_router::DecisionEngineEliminationData {
threshold: DEFAULT_ELIMINATION_THRESHOLD,
}),
}
} | crates/api_models/src/routing.rs | api_models | function_signature | 57 | rust | null | null | null | null | open_router_config_default | null | null | null | null | null | null | null |
impl api::PayoutFulfill for Ebanx {} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Ebanx | api::PayoutFulfill for | impl api::PayoutFulfill for for Ebanx | null | null | null | null | null | null | null | null |
pub struct Dwolla {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/dwolla.rs | hyperswitch_connectors | struct_definition | 27 | rust | Dwolla | null | null | null | null | null | null | null | null | null | null | null |
pub struct ConnectorEvent {
tenant_id: common_utils::id_type::TenantId,
connector_name: String,
flow: String,
request: String,
masked_response: Option<String>,
error: Option<String>,
url: String,
method: String,
payment_id: String,
merchant_id: common_utils::id_type::MerchantId,
... | crates/hyperswitch_interfaces/src/events/connector_api_logs.rs | hyperswitch_interfaces | struct_definition | 130 | rust | ConnectorEvent | null | null | null | null | null | null | null | null | null | null | null |
pub async fn retrieve_card_info(
state: routes::SessionState,
merchant_context: domain::MerchantContext,
request: cards_info_api_types::CardsInfoRequest,
) -> RouterResponse<cards_info_api_types::CardInfoResponse> {
let db = state.store.as_ref();
verify_iin_length(&request.card_iin)?;
helpers::... | crates/router/src/core/cards_info.rs | router | function_signature | 190 | rust | null | null | null | null | retrieve_card_info | null | null | null | null | null | null | null |
pub async fn list_merchants_for_user_in_org(
state: SessionState,
user_from_token: auth::UserFromToken,
) -> UserResponse<Vec<user_api::UserMerchantAccountResponse>> {
let role_info = roles::RoleInfo::from_role_id_org_id_tenant_id(
&state,
&user_from_token.role_id,
&user_from_token.o... | crates/router/src/core/user.rs | router | function_signature | 581 | rust | null | null | null | null | list_merchants_for_user_in_org | null | null | null | null | null | null | null |
impl ExchangeRates {
pub fn new(base_currency: Currency, conversion: HashMap<Currency, CurrencyFactors>) -> Self {
Self {
base_currency,
conversion,
}
}
/// The flow here is from_currency -> base_currency -> to_currency
/// from to_currency -> base currency
p... | crates/currency_conversion/src/types.rs | currency_conversion | impl_block | 277 | rust | null | ExchangeRates | null | impl ExchangeRates | null | null | null | null | null | null | null | null |
impl<T, I> Serialize for StrongSecret<T, I>
where
T: SerializableSecret + Serialize + ZeroizableSecret + Sized,
I: Strategy<T>,
{
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
pii_serializer::pii_serialize(self, serializer)
}
} | crates/masking/src/serde.rs | masking | impl_block | 80 | rust | null | StrongSecret | Serialize for | impl Serialize for for StrongSecret | null | null | null | null | null | null | null | null |
pub async fn connector_retrieve(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::MerchantConnectorAccountId>,
) -> HttpResponse {
let flow = Flow::MerchantConnectorsRetrieve;
let id = path.into_inner();
let payload = web::Json(admin::MerchantConnectorId { id:... | crates/router/src/routes/admin.rs | router | function_signature | 242 | rust | null | null | null | null | connector_retrieve | null | null | null | null | null | null | null |
impl Capturable for PaymentsSyncData {
#[cfg(feature = "v1")]
fn get_captured_amount<F>(
&self,
_amount_captured: Option<i64>,
payment_data: &PaymentData<F>,
) -> Option<i64>
where
F: Clone,
{
payment_data
.payment_attempt
.amount_to_ca... | crates/router/src/types.rs | router | impl_block | 465 | rust | null | PaymentsSyncData | Capturable for | impl Capturable for for PaymentsSyncData | null | null | null | null | null | null | null | null |
pub struct PaymentLink {
pub href: String,
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 12 | rust | PaymentLink | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Stax {} | crates/hyperswitch_connectors/src/connectors/stax.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Stax | api::RefundSync for | impl api::RefundSync for for Stax | null | null | null | null | null | null | null | null |
pub fn parse_csv(
merchant_id: &id_type::MerchantId,
data: &[u8],
) -> csv::Result<Vec<payment_methods_api::CardNetworkTokenizeRequest>> {
let mut csv_reader = csv::ReaderBuilder::new()
.has_headers(true)
.from_reader(data);
let mut records = Vec::new();
let mut id_counter = 0;
f... | crates/router/src/core/payment_methods/tokenize.rs | router | function_signature | 263 | rust | null | null | null | null | parse_csv | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.