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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub struct FiservemeaRefundRequest {
request_type: FiservemeaRequestType,
transaction_amount: FiservemeaTransactionAmount,
} | crates/hyperswitch_connectors/src/connectors/fiservemea/transformers.rs | hyperswitch_connectors | struct_definition | 36 | rust | FiservemeaRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Barclaycard {} | crates/hyperswitch_connectors/src/connectors/barclaycard.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Barclaycard | api::Refund for | impl api::Refund for for Barclaycard | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Tokenio {} | crates/hyperswitch_connectors/src/connectors/tokenio.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Tokenio | api::RefundExecute for | impl api::RefundExecute for for Tokenio | null | null | null | null | null | null | null | null |
pub async fn merchant_account_list(
state: web::Data<AppState>,
req: HttpRequest,
organization_id: web::Path<common_utils::id_type::OrganizationId>,
) -> HttpResponse {
let flow = Flow::MerchantAccountList;
let organization_id = admin::OrganizationId {
organization_id: organization_id.into_... | crates/router/src/routes/admin.rs | router | function_signature | 175 | rust | null | null | null | null | merchant_account_list | null | null | null | null | null | null | null |
pub struct ConnectorInfo {
/// Display name of the Connector
pub display_name: &'static str,
/// Description of the connector.
pub description: &'static str,
/// Connector Type
pub connector_type: common_enums::HyperswitchConnectorCategory,
/// Integration status of the connector
pub int... | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | struct_definition | 80 | rust | ConnectorInfo | null | null | null | null | null | null | null | null | null | null | null |
pub struct FiservSyncResponse {
pub sync_responses: Vec<FiservPaymentsResponse>,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | FiservSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_organization(
state: SessionState,
org_id: api::OrganizationId,
req: api::OrganizationUpdateRequest,
) -> RouterResponse<api::OrganizationResponse> {
let organization_update = diesel_models::organization::OrganizationUpdate::Update {
organization_name: req.organization_name,
... | crates/router/src/core/admin.rs | router | function_signature | 203 | rust | null | null | null | null | update_organization | null | null | null | null | null | null | null |
File: crates/router/src/core/user.rs
Public functions: 46
use std::{
collections::{HashMap, HashSet},
ops::Not,
};
use api_models::{
payments::RedirectionResponse,
user::{self as user_api, InviteMultipleUserResponse, NameIdUnit},
};
use common_enums::{connector_enums, EntityType, UserAuthType};
use c... | crates/router/src/core/user.rs#chunk0 | router | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/payments/payments--list.mdx
# Type: Doc File
---
openapi: get /v2/payments/list
--- | api-reference/v2/payments/payments--list.mdx | null | doc_file | 34 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlaidSchedule {
interval: String,
interval_execution_day: String,
start_date: String,
end_date: Option<String>,
adjusted_start_date: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/plaid/transformers.rs | hyperswitch_connectors | struct_definition | 40 | rust | PlaidSchedule | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_payment_intent_api(
state: &SessionState,
global_payment_id: id_type::GlobalPaymentId,
revenue_recovery_payment_data: &storage::revenue_recovery::RevenueRecoveryPaymentData,
update_req: payments_api::PaymentsUpdateIntentRequest,
) -> RouterResult<payments_domain::PaymentIntentData<ap... | crates/router/src/core/revenue_recovery/api.rs | router | function_signature | 261 | rust | null | null | null | null | update_payment_intent_api | null | null | null | null | null | null | null |
pub async fn get_total_count_of_attempts(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
active_attempt_ids: &[String],
connector: Option<Vec<String>>,
payment_method: Option<Vec<enums::PaymentMethod>>,
payment_method_type: Option<Vec<enums::Payment... | crates/diesel_models/src/query/payment_attempt.rs | diesel_models | function_signature | 571 | rust | null | null | null | null | get_total_count_of_attempts | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Boku {} | crates/hyperswitch_connectors/src/connectors/boku.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Boku | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Boku | null | null | null | null | null | null | null | null |
pub struct UploadFileRequest {
pub asset_name: String,
pub asset_data: Secret<Vec<u8>>,
} | crates/api_models/src/user/theme.rs | api_models | struct_definition | 24 | rust | UploadFileRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn dummy_connector_complete_payment(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
path: web::Path<String>,
json_payload: web::Query<types::DummyConnectorPaymentCompleteBody>,
) -> impl actix_web::Responder {
let flow = types::Flow::DummyPaymentComplete;
let attempt_id ... | crates/router/src/routes/dummy_connector.rs | router | function_signature | 172 | rust | null | null | null | null | dummy_connector_complete_payment | null | null | null | null | null | null | null |
pub fn validate_stripe_charge_refund(
charge_type_option: Option<api_enums::PaymentChargeType>,
split_refund_request: &Option<common_types::refunds::SplitRefund>,
) -> RouterResult<types::ChargeRefundsOptions> {
let charge_type = charge_type_option.ok_or_else(|| {
report!(errors::ApiErrorResponse::I... | crates/router/src/core/utils/refunds_validator.rs | router | function_signature | 345 | rust | null | null | null | null | validate_stripe_charge_refund | null | null | null | null | null | null | null |
pub struct KlarnaSessionResponse {
pub client_token: Secret<String>,
pub session_id: String,
} | crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | KlarnaSessionResponse | null | null | null | null | null | null | null | null | null | null | null |
impl fmt::Display for RecordType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let repr = match self {
Self::EnterSpan => "START",
Self::ExitSpan => "END",
Self::Event => "EVENT",
};
write!(f, "{repr}")
}
} | crates/router_env/src/logger/formatter.rs | router_env | impl_block | 75 | rust | null | RecordType | fmt::Display for | impl fmt::Display for for RecordType | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Square {} | crates/hyperswitch_connectors/src/connectors/square.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Square | api::PaymentSync for | impl api::PaymentSync for for Square | null | null | null | null | null | null | null | null |
pub struct PaymentRedirectSync; | crates/router/src/core/payments.rs | router | struct_definition | 6 | rust | PaymentRedirectSync | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/db/merchant_connector_account.rs
use async_bb8_diesel::AsyncConnection;
use common_utils::{
encryption::Encryption,
ext_traits::{AsyncExt, ByteSliceExt, Encode},
types::keymanager::KeyManagerState,
};
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
#[cfg... | crates/router/src/db/merchant_connector_account.rs#chunk0 | router | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl AccountsStorageInterface for Store {} | crates/router/src/db.rs | router | impl_block | 7 | rust | null | Store | AccountsStorageInterface for | impl AccountsStorageInterface for for Store | null | null | null | null | null | null | null | null |
pub struct ProphetpayTokenRequest {
ref_info: String,
profile: Secret<String>,
entry_method: i8,
token_type: i8,
card_entry_context: i8,
} | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | struct_definition | 42 | rust | ProphetpayTokenRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexPaymentsCancelRequest {
// Unique ID to be sent for each transaction/operation request to the connector
request_id: String,
cancellation_reason: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 40 | rust | AirwallexPaymentsCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
user_from_token: auth::UserFromToken,
) -> UserResponse<user_api::TokenResponse> {
if user_from_token.merchant_id == request.merchant_id {
return Err(UserErrors::InvalidRoleOperationWithMessage(
"User switching to same merchant".to_string(),
)
.into());
}
let key_man... | crates/router/src/core/user.rs#chunk3 | router | chunk | 3,146 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct TokenizedWalletValue2 {
pub customer_id: Option<id_type::CustomerId>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 21 | rust | TokenizedWalletValue2 | null | null | null | null | null | null | null | null | null | null | null |
File: crates/external_services/src/email/no_email.rs
Public functions: 1
Public structs: 1
use common_utils::{errors::CustomResult, pii};
use router_env::logger;
use crate::email::{EmailClient, EmailError, EmailResult, IntermediateString};
/// Client when email support is disabled
#[derive(Debug, Clone, Default, s... | crates/external_services/src/email/no_email.rs | external_services | full_file | 261 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexPaymentsRequest {
// Unique ID to be sent for each transaction/operation request to the connector
request_id: String,
payment_method: AirwallexPaymentMethod,
payment_method_options: Option<AirwallexPaymentOptions>,
return_url: Option<String>,
device_data: DeviceData,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 69 | rust | AirwallexPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn make_stream_available(&self, stream_name_flag: &str) -> errors::DrainerResult<()> {
match self.redis_conn.delete_key(&stream_name_flag.into()).await {
Ok(redis::DelReply::KeyDeleted) => Ok(()),
Ok(redis::DelReply::KeyNotDeleted) => {
logger::error!("Tried to ... | crates/drainer/src/stream.rs | drainer | function_signature | 108 | rust | null | null | null | null | make_stream_available | null | null | null | null | null | null | null |
impl api::PaymentToken for Bamboraapac {} | crates/hyperswitch_connectors/src/connectors/bamboraapac.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Bamboraapac | api::PaymentToken for | impl api::PaymentToken for for Bamboraapac | null | null | null | null | null | null | null | null |
File: crates/router/src/core/webhooks/webhook_events.rs
Public functions: 3
use std::collections::HashSet;
use common_utils::{self, errors::CustomResult, fp_utils};
use error_stack::ResultExt;
use masking::PeekInterface;
use router_env::{instrument, tracing};
use crate::{
core::errors::{self, RouterResponse, St... | crates/router/src/core/webhooks/webhook_events.rs | router | full_file | 3,514 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Katapult {} | crates/hyperswitch_connectors/src/connectors/katapult.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Katapult | api::PaymentCapture for | impl api::PaymentCapture for for Katapult | null | null | null | null | null | null | null | null |
impl Headers {
pub fn as_map(&self) -> &HashMap<String, String> {
&self.0
}
pub fn from_header_map(headers: Option<&HeaderMap>) -> Self {
headers
.map(|h| {
let map = h
.iter()
.map(|(k, v)| (k.to_string(), v.to_str().unwra... | crates/api_models/src/proxy.rs | api_models | impl_block | 112 | rust | null | Headers | null | impl Headers | null | null | null | null | null | null | null | null |
/// Convert the amount to its base denomination based on Currency and return String
pub fn to_currency_base_unit(self, amount: i64) -> Result<String, TryFromIntError> {
let amount_f64 = self.to_currency_base_unit_asf64(amount)?;
Ok(format!("{amount_f64:.2}"))
} | crates/common_enums/src/enums.rs | common_enums | function_signature | 72 | rust | null | null | null | null | to_currency_base_unit | null | null | null | null | null | null | null |
pub struct PlacetopayAuthType {
login: Secret<String>,
tran_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/placetopay/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | PlacetopayAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct ErrorResponse {
pub error_id: Option<String>,
pub errors: Vec<Error>,
} | crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | ErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Macro to implement From trait for types wrapped in RequiredFromNullableWithDefault
#[macro_export]
macro_rules! impl_from_required_from_nullable_with_default {
($($type:ty),* $(,)?) => {
$(
impl From<$crate::RequiredFromNullableWithDefault<$type>> for $type {
... | crates/diesel_models/src/lib.rs | diesel_models | macro | 102 | rust | null | null | null | null | null | null | null | null | declarative | null | null | null |
pub struct DummyConnectorErrorResponse {
pub error: ErrorData,
} | crates/hyperswitch_connectors/src/connectors/dummyconnector/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | DummyConnectorErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/payout_link").app_data(web::Data::new(state));
route = route.service(
web::resource("/{merchant_id}/{payout_id}").route(web::get().to(render_payout_link)),
);
route
} | crates/router/src/routes/app.rs | router | function_signature | 69 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
impl UnifiedConnectorServiceClient {
/// Builds the connection to the gRPC service
pub async fn build_connections(config: &GrpcClientSettings) -> Option<Self> {
match &config.unified_connector_service {
Some(unified_connector_service_client_config) => {
let uri: Uri = match u... | crates/external_services/src/grpc_client/unified_connector_service.rs | external_services | impl_block | 1,420 | rust | null | UnifiedConnectorServiceClient | null | impl UnifiedConnectorServiceClient | null | null | null | null | null | null | null | null |
pub trait AuthServiceBankAccountCredentials:
super::ConnectorIntegration<
BankAccountCredentials,
BankAccountCredentialsRequest,
BankAccountCredentialsResponse,
>
{
} | crates/pm_auth/src/types/api/auth_service.rs | pm_auth | trait_definition | 33 | rust | null | null | AuthServiceBankAccountCredentials | null | null | null | null | null | null | null | null | null |
impl Shift4AuthorizePreprocessingCommon for PaymentsPreProcessingData {
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) -> Result... | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | impl_block | 230 | rust | null | PaymentsPreProcessingData | Shift4AuthorizePreprocessingCommon for | impl Shift4AuthorizePreprocessingCommon for for PaymentsPreProcessingData | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PayseraData
{
"type": "object"
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 21 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PayseraData"
] | null | null | null | null |
pub struct TokenizedBankSensitiveValues {
pub bank_account_number: Option<masking::Secret<String>>,
pub bank_routing_number: Option<masking::Secret<String>>,
pub bic: Option<masking::Secret<String>>,
pub bank_sort_code: Option<masking::Secret<String>>,
pub iban: Option<masking::Secret<String>>,
... | crates/router/src/core/payment_methods/vault.rs | router | struct_definition | 102 | rust | TokenizedBankSensitiveValues | null | null | null | null | null | null | null | null | null | null | null |
pub async fn perform_session_token_routing<F, D>(
state: SessionState,
business_profile: &domain::Profile,
merchant_context: domain::MerchantContext,
payment_data: &D,
connectors: api::SessionConnectorDatas,
) -> RouterResult<SessionTokenRoutingResult>
where
F: Clone,
D: OperationSessionGett... | crates/router/src/core/payments.rs | router | function_signature | 271 | rust | null | null | null | null | perform_session_token_routing | null | null | null | null | null | null | null |
pub fn get_role_name(&self) -> &str {
&self.role_name
} | crates/router/src/services/authorization/roles.rs | router | function_signature | 20 | rust | null | null | null | null | get_role_name | null | null | null | null | null | null | null |
pub struct BankOfAmericaPaymentsRequest {
processing_information: ProcessingInformation,
payment_information: PaymentInformation,
order_information: OrderInformationWithBill,
client_reference_information: ClientReferenceInformation,
#[serde(skip_serializing_if = "Option::is_none")]
consumer_auth... | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 95 | rust | BankOfAmericaPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayuProductData {
name: String,
unit_price: String,
quantity: String,
#[serde(rename = "virtual")]
virtually: Option<bool>,
listing_date: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/payu/transformers.rs | hyperswitch_connectors | struct_definition | 45 | rust | PayuProductData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router_env/tests/env.rs
#![allow(clippy::print_stdout)]
#[cfg(feature = "vergen")]
use router_env as env;
#[cfg(feature = "vergen")]
#[tokio::test]
async fn basic() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
println!("CARGO_PKG_VERSION : {:?}", env!("CARGO_PKG_VERSION"));
println!... | crates/router_env/tests/env.rs | router_env | full_file | 310 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn incoming_webhooks_wrapper<W: types::OutgoingWebhookType>(
flow: &impl router_env::types::FlowMetric,
state: SessionState,
req_state: ReqState,
req: &actix_web::HttpRequest,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
connector_id: &common_utils::id_type:... | crates/router/src/core/webhooks/incoming_v2.rs | router | function_signature | 501 | rust | null | null | null | null | incoming_webhooks_wrapper | null | null | null | null | null | null | null |
pub struct GetnetCancelResponse {
payment: CancelResponseData,
} | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | GetnetCancelResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct FrmMerchantAccount {
pub merchant_id: common_utils::id_type::MerchantId,
} | crates/router/src/core/fraud_check/types.rs | router | struct_definition | 21 | rust | FrmMerchantAccount | null | null | null | null | null | null | null | null | null | null | null |
}
pub async fn retry_delete_tokenize(
db: &dyn db::StorageInterface,
pm: enums::PaymentMethod,
pt: storage::ProcessTracker,
) -> Result<(), errors::ProcessTrackerError> {
let schedule_time = get_delete_tokenize_schedule_time(db, pm, pt.retry_count).await;
match schedule_time {
Some(s_time)... | crates/router/src/core/payment_methods/vault.rs#chunk2 | router | chunk | 218 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_shipping_address(&self) -> Option<Address> {
self.shipping.clone()
} | crates/api_models/src/authentication.rs | api_models | function_signature | 21 | rust | null | null | null | null | get_shipping_address | null | null | null | null | null | null | null |
pub struct FiuuRefundRequest {
pub refund_type: RefundType,
#[serde(rename = "MerchantID")]
pub merchant_id: Secret<String>,
#[serde(rename = "RefID")]
pub ref_id: String,
#[serde(rename = "TxnID")]
pub txn_id: String,
pub amount: StringMajorUnit,
pub signature: Secret<String>,
#... | crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs | hyperswitch_connectors | struct_definition | 102 | rust | FiuuRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.OrderDetailsWithAmount
{
"type": "object",
"required": [
"product_name",
"quantity",
"amount"
],
"properties": {
"product_name": {
"type": "string",
"description": "Name of the product that is being purchased",
"example": "shirt",
"m... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 793 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"OrderDetailsWithAmount"
] | null | null | null | null |
pub struct CardToken {
#[serde(rename = "type")]
pub payment_type: PaymentType,
pub href: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub cvc: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs | hyperswitch_connectors | struct_definition | 52 | rust | CardToken | null | null | null | null | null | null | null | null | null | null | null |
pub struct MockTokenizeDBValue {
pub value1: String,
pub value2: String,
} | crates/router/src/core/payment_methods/vault.rs | router | struct_definition | 23 | rust | MockTokenizeDBValue | null | null | null | null | null | null | null | null | null | null | null |
pub trait GetLockingInput {
fn get_locking_input<F>(&self, flow: F) -> LockAction
where
F: router_env::types::FlowMetric,
lock_utils::ApiIdentifier: From<F>;
} | crates/router/src/core/api_locking.rs | router | trait_definition | 50 | rust | null | null | GetLockingInput | null | null | null | null | null | null | null | null | null |
impl ApiEventMetric for GenerateFingerprintResponsePayload {} | crates/api_models/src/blocklist.rs | api_models | impl_block | 11 | rust | null | GenerateFingerprintResponsePayload | ApiEventMetric for | impl ApiEventMetric for for GenerateFingerprintResponsePayload | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentsCaptureRequest
{
"type": "object",
"properties": {
"merchant_id": {
"type": "string",
"description": "The unique identifier for the merchant. This is usually inferred from the API key.",
"nullable": true
},
"amount_to_capture": {
"ty... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 412 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentsCaptureRequest"
] | null | null | null | null |
pub struct GocardlessRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | GocardlessRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct UnifiedAuthenticationServiceAuthenticateConfirmationRequest {
pub authenticate_by: String,
pub source_authentication_id: common_utils::id_type::AuthenticationId,
pub auth_creds: UnifiedAuthenticationServiceAuthType,
pub x_src_flow_id: Option<String>,
pub transaction_amount: Option<FloatMa... | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 153 | rust | UnifiedAuthenticationServiceAuthenticateConfirmationRequest | null | null | null | null | null | null | null | null | null | null | null |
| PaymentAction::PaymentAuthenticateCompleteAuthorize => {
Ok(CallConnectorAction::Trigger)
}
}
}
}
static GLOBALPAY_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> =
LazyLock::new(|| {
let supported_capture_methods = vec![
enums:... | crates/hyperswitch_connectors/src/connectors/globalpay.rs#chunk1 | hyperswitch_connectors | chunk | 1,157 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BillingData {
bill_addr_city: Option<String>,
bill_addr_country: Option<String>,
bill_addr_line1: Option<Secret<String>>,
bill_addr_line2: Option<Secret<String>>,
bill_addr_line3: Option<Secret<String>>,
bill_addr_postal_code: Option<Secret<String>>,
bill_addr_state: Option<Secret... | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 77 | rust | BillingData | null | null | null | null | null | null | null | null | null | null | null |
pub struct Timeline {
status: CoinbasePaymentStatus,
context: Option<UnResolvedContext>,
time: String,
pub payment: Option<TimelinePayment>,
} | crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | Timeline | null | null | null | null | null | null | null | null | null | null | null |
impl ApiEventMetric for DisputeId {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Dispute {
dispute_id: self.dispute_id.clone(),
})
}
} | crates/router/src/events/api_logs.rs | router | impl_block | 50 | rust | null | DisputeId | ApiEventMetric for | impl ApiEventMetric for for DisputeId | null | null | null | null | null | null | null | null |
pub async fn proxy_for_payments_core<F, Res, Req, Op, FData, D>(
state: SessionState,
req_state: ReqState,
merchant_context: domain::MerchantContext,
profile: domain::Profile,
operation: Op,
req: Req,
payment_id: id_type::GlobalPaymentId,
call_connector_action: CallConnectorAction,
h... | crates/router/src/core/payments.rs | router | function_signature | 517 | rust | null | null | null | null | proxy_for_payments_core | null | null | null | null | null | null | null |
impl ApiClientError {
pub fn is_upstream_timeout(&self) -> bool {
self == &Self::RequestTimeoutReceived
}
pub fn is_connection_closed_before_message_could_complete(&self) -> bool {
self == &Self::ConnectionClosedIncompleteMessage
}
} | crates/common_enums/src/enums.rs | common_enums | impl_block | 61 | rust | null | ApiClientError | null | impl ApiClientError | null | null | null | null | null | null | null | null |
pub async fn find_by_customer_id_merchant_id(
conn: &PgPooledConn,
customer_id: &id_type::CustomerId,
merchant_id: &id_type::MerchantId,
) -> StorageResult<Self> {
generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>(
conn,
(customer_id.to_owned(), ... | crates/diesel_models/src/query/customers.rs | diesel_models | function_signature | 91 | rust | null | null | null | null | find_by_customer_id_merchant_id | null | null | null | null | null | null | null |
pub struct ShouldCollectCvvDuringPayment(bool); | crates/common_types/src/primitive_wrappers.rs | common_types | struct_definition | 10 | rust | ShouldCollectCvvDuringPayment | null | null | null | null | null | null | null | null | null | null | null |
pub fn two_digits(&self) -> String {
let year = self.peek() % 100;
year.to_string()
} | crates/cards/src/lib.rs | cards | function_signature | 30 | rust | null | null | null | null | two_digits | null | null | null | null | null | null | null |
impl ConnectorValidation for Katapult {
fn validate_mandate_payment(
&self,
_pm_type: Option<enums::PaymentMethodType>,
pm_data: PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
match pm_data {
PaymentMethodData::Card(_) => Err(errors::ConnectorError... | crates/hyperswitch_connectors/src/connectors/katapult.rs | hyperswitch_connectors | impl_block | 179 | rust | null | Katapult | ConnectorValidation for | impl ConnectorValidation for for Katapult | null | null | null | null | null | null | null | null |
File: crates/test_utils/tests/connectors/stripe_wh_ui.rs
use thirtyfour::{prelude::*, WebDriver};
use crate::{selenium::*, tester};
struct StripeSeleniumTest;
impl SeleniumTest for StripeSeleniumTest {
fn get_connector_name(&self) -> String {
"stripe".to_string()
}
}
async fn should_make_webhook(we... | crates/test_utils/tests/connectors/stripe_wh_ui.rs | test_utils | full_file | 210 | null | null | null | null | null | null | null | null | null | null | null | null | null |
connectors::Nomupay,
connectors::Noon,
connectors::Nordea,
connectors::Novalnet,
connectors::Nexinets,
connectors::Nexixpay,
connectors::Nuvei,
connectors::Opayo,
connectors::Opennode,
connectors::Payeezy,
connectors::Payload,
connectors::Paystack,
connectors::Paytm,
... | crates/hyperswitch_connectors/src/default_implementations.rs#chunk5 | hyperswitch_connectors | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Braintree {} | crates/hyperswitch_connectors/src/connectors/braintree.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Braintree | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Braintree | null | null | null | null | null | null | null | null |
pub struct SdkEventFilters {
#[serde(default)]
pub payment_method: Vec<String>,
#[serde(default)]
pub platform: Vec<String>,
#[serde(default)]
pub browser_name: Vec<String>,
#[serde(default)]
pub source: Vec<String>,
#[serde(default)]
pub component: Vec<String>,
#[serde(defau... | crates/api_models/src/analytics/sdk_events.rs | api_models | struct_definition | 83 | rust | SdkEventFilters | null | null | null | null | null | null | null | null | null | null | null |
impl Connectors {
pub fn get_connector_params(
&self,
connector: connector_enums::Connector,
) -> CustomResult<ConnectorParams, api_error_response::ApiErrorResponse> {
match connector {
connector_enums::Connector::Recurly => Ok(self.recurly.clone()),
connector_enu... | crates/hyperswitch_domain_models/src/connector_endpoints.rs | hyperswitch_domain_models | impl_block | 119 | rust | null | Connectors | null | impl Connectors | null | null | null | null | null | null | null | null |
pub async fn config_key_update(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
json_payload: web::Json<api_types::ConfigUpdate>,
) -> impl Responder {
let flow = Flow::ConfigKeyUpdate;
let mut payload = json_payload.into_inner();
let key = path.into_inner();
paylo... | crates/router/src/routes/configs.rs | router | function_signature | 144 | rust | null | null | null | null | config_key_update | null | null | null | null | null | null | null |
pub async fn sync_refund_with_gateway(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payment_attempt: &storage::PaymentAttempt,
payment_intent: &storage::PaymentIntent,
refund: &diesel_refund::Refund,
) -> errors::RouterResult<diesel_refund::Refund> {
let db = &*state.store;
... | crates/router/src/core/refunds_v2.rs | router | function_signature | 615 | rust | null | null | null | null | sync_refund_with_gateway | null | null | null | null | null | null | null |
impl CardNetwork {
pub fn is_signature_network(&self) -> bool {
match self {
Self::Interac
| Self::Star
| Self::Pulse
| Self::Accel
| Self::Nyce
| Self::CartesBancaires => false,
Self::Visa
| Self::Mastercard
... | crates/common_enums/src/enums.rs | common_enums | impl_block | 258 | rust | null | CardNetwork | null | impl CardNetwork | null | null | null | null | null | null | null | null |
pub struct RevenueRecovery<'a> {
pub merchant_id: &'a id_type::MerchantId,
pub invoice_amount: MinorUnit,
pub invoice_currency: &'a common_enums::Currency,
#[serde(default, with = "time::serde::timestamp::nanoseconds::option")]
pub invoice_due_date: Option<OffsetDateTime>,
#[serde(with = "time::... | crates/router/src/services/kafka/revenue_recovery.rs | router | struct_definition | 345 | rust | RevenueRecovery | null | null | null | null | null | null | null | null | null | null | null |
/// lowers the provided key for a numerical value
///
/// For example
/// ```notrust
/// payment_amount = 17052001
/// ```notrust
/// This is for the cases in which there are numerical values involved and they are lowered
/// accordingly on basis of the supplied key, currently payment_amount is the only key having this... | crates/euclid/src/frontend/ast/lowering.rs | euclid | macro | 318 | rust | null | null | null | null | null | null | null | null | declarative | null | null | null |
OpenAPI Block Path: components.schemas.BankDebitTypes
{
"type": "object",
"required": [
"eligible_connectors"
],
"properties": {
"eligible_connectors": {
"type": "array",
"items": {
"type": "string"
}
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 73 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BankDebitTypes"
] | null | null | null | null |
File: crates/router/tests/integration_demo.rs
#![allow(clippy::unwrap_used)]
mod utils;
use masking::PeekInterface;
use test_utils::connector_auth::ConnectorAuthentication;
use utils::{mk_service, ApiKey, AppClient, MerchantId, PaymentId, Status};
/// Example of unit test
/// Kind of test: output-based testing
/// 1... | crates/router/tests/integration_demo.rs | router | full_file | 1,598 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Apm {
/// A string used to identify the payment method provider being used to execute this
/// transaction.
pub provider: Option<ApmProvider>,
} | crates/hyperswitch_connectors/src/connectors/globalpay/requests.rs | hyperswitch_connectors | struct_definition | 36 | rust | Apm | null | null | null | null | null | null | null | null | null | null | null |
pub struct ChannelProperties {
pub success_return_url: String,
pub failure_return_url: String,
pub skip_three_d_secure: bool,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 31 | rust | ChannelProperties | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let (payment_id, merchant_id, connector, creds_identifier) = path.into_inner();
let param_string = req.query_string();
tracing::Span::current().record("payment_id", payment_id.get_string_repr());
let payload = payments::PaymentsRedirectResponseData {
resource_id: payment_types... | crates/router/src/routes/payments.rs | router | impl_block | 284 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl RequiredFieldsInput {
fn new(required_fields_config: settings::RequiredFields) -> Self {
Self {
required_fields_config,
}
}
} | crates/router/src/core/payment_methods.rs | router | impl_block | 33 | rust | null | RequiredFieldsInput | null | impl RequiredFieldsInput | null | null | null | null | null | null | null | null |
pub struct GenerateNetworkTokenResponsePayload {
pub card_brand: api_enums::CardNetwork,
pub card_fingerprint: Option<Secret<String>>,
pub card_reference: String,
pub correlation_id: String,
pub customer_id: String,
pub par: String,
pub token: NetworkToken,
pub token_expiry_month: Secret... | crates/router/src/types/payment_methods.rs | router | struct_definition | 107 | rust | GenerateNetworkTokenResponsePayload | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_metadata_as_secret(
&self,
) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> {
self.metadata
.as_ref()
.map(|metadata| metadata.encode_to_value().map(Secret::new))
.transpose()
} | crates/api_models/src/admin.rs | api_models | function_signature | 63 | rust | null | null | null | null | get_metadata_as_secret | null | null | null | null | null | null | null |
File: crates/router/src/consts/user.rs
use common_enums;
use common_utils::consts::MAX_ALLOWED_MERCHANT_NAME_LENGTH;
pub const MAX_NAME_LENGTH: usize = 70;
/// The max length of company name and merchant should be same
/// because we are deriving the merchant name from company name
pub const MAX_COMPANY_NAME_LENGTH:... | crates/router/src/consts/user.rs | router | full_file | 587 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ProcessTracker {
pub fn server(state: AppState) -> Scope {
use super::process_tracker::revenue_recovery;
web::scope("/v2/process-trackers/revenue-recovery-workflow")
.app_data(web::Data::new(state.clone()))
.service(
web::resource("/{revenue_recovery_id}"... | crates/router/src/routes/app.rs | router | impl_block | 94 | rust | null | ProcessTracker | null | impl ProcessTracker | null | null | null | null | null | null | null | null |
pub struct CryptopayErrorData {
pub code: String,
pub message: String,
pub reason: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | CryptopayErrorData | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Stripe {
fn validate_connector_against_payment_request(
&self,
capture_method: Option<CaptureMethod>,
_payment_method: common_enums::PaymentMethod,
_pmt: Option<PaymentMethodType>,
) -> CustomResult<(), ConnectorError> {
let capture_method = c... | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 310 | rust | null | Stripe | ConnectorValidation for | impl ConnectorValidation for for Stripe | null | null | null | null | null | null | null | null |
pub struct Profile {
early_decision: Option<String>,
name: Option<String>,
decision: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | Profile | null | null | null | null | null | null | null | null | null | null | null |
### Features
- **connector:** [BANKOFAMERICA] Implement 3DS flow for cards ([#3343](https://github.com/juspay/hyperswitch/pull/3343)) ([`d533c98`](https://github.com/juspay/hyperswitch/commit/d533c98b5107fb6876c11b183eb9bc382a77a2f1))
- **recon:** Add recon APIs ([#3345](https://github.com/juspay/hyperswitch/pull/334... | CHANGELOG.md#chunk42 | null | doc_chunk | 8,103 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_payment_attempt_from_object_reference_id(
state: &SessionState,
object_reference_id: webhooks::ObjectReferenceId,
merchant_context: &domain::MerchantContext,
) -> CustomResult<PaymentAttempt, errors::ApiErrorResponse> {
let db = &*state.store;
match object_reference_id {
api... | crates/router/src/core/webhooks/incoming.rs | router | function_signature | 353 | rust | null | null | null | null | get_payment_attempt_from_object_reference_id | null | null | null | null | null | null | null |
impl PaymentMethodCreateWrapper {
fn get_inner(self) -> api::payment_methods::PaymentMethodCreate {
self.0
}
} | crates/router/src/core/webhooks/network_tokenization_incoming.rs | router | impl_block | 30 | rust | null | PaymentMethodCreateWrapper | null | impl PaymentMethodCreateWrapper | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Nexixpay {} | crates/hyperswitch_connectors/src/connectors/nexixpay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Nexixpay | api::RefundExecute for | impl api::RefundExecute for for Nexixpay | null | 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.