text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
payment_method_session,
Secret::new("CLIENT_SECRET_REDACTED".to_string()),
payments_response,
);
Ok(services::ApplicationResponse::Json(
payment_method_session_response,
))
}
#[cfg... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
payment_link_config: None,
request_incremental_authorization: None,
session_expiry: None,
frm_metadata: None,
request_external_three_ds_authentication: None,
customer_acceptance:... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
message: "payment methods session does not exist or has expired".to_string(),
})
.attach_printable("Failed to retrieve payment methods session from db")?;
let response = delete_payment_method_c... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.attach_printable("Failed to retrieve payment methods session from db")?;
let response = transformers::generate_payment_method_session_response(
payment_method_session_domain_model,
Secret::new("CL... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.attach_printable("Failed to insert payment methods session in db")?;
let response = transformers::generate_payment_method_session_response(
payment_method_session_domain_model,
client_secret.secret,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed while encrypting payment methods session detailss")?;
Ok(encrypted_data)
}
}
#[cfg(feature = "v2")]
#[async... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
merchant_account: domain::MerchantAccount,
) -> RouterResponse<api::PaymentMethodDeleteResponse> {
let pm_id = id_type::GlobalPaymentMethodId::generate_from_string(pm_id.payment_method_id)
.change_context(error... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
)
.await
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Unable to get total payment method count")?;
let response = api::TotalPaymentMethodCountResponse {... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
consts::ID_LENGTH,
"token",
)),
),
})
}
};
Ok(payment_method_retrieval_context)
}
#[cfg(all(feature = "v2", feat... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.map(|data| data.network_token_requestor_reference_id),
network_token_locker_id: nt_data.clone().map(|data| data.network_token_locker_id),
network_token_payment_method_data: nt_data.map(|data| data.... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
reference_record_hash_map,
);
hyperswitch_domain_models::mandates::CommonMandateReference {
payments: Some(payments_mandate_reference),
payouts: N... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
storage_scheme,
)
.await
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to add payment method in db")?;
Ok(response)
}
#[cfg(feature =... | ast_fragments |
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.collect();
payment_methods::PaymentMethodListResponse {
payment_methods_enabled: response_payment_methods,
customer_payment_methods,
}
}
}
#[cfg(all(feature = "v2", feature = "paymen... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
use hyperswitch_domain_models::mandates::CommonMandateReference;
use crate::{
configs::settings,
core::{payment_methods::transformers as pm_transforms, payments as payments_core},
db::errors::ConnectorErrorExt,
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
#[cfg(feature = "v2")]
impl PerformFilteringOnEnabledPaymentMethods
for hyperswitch_domain_models::merchant_connector_account::FlattenedPaymentMethodsEnabled
{
fn perform_filtering(self) -> FilteredPaymentMethodsEnabl... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
}),
card_cvc: card.card_cvc.clone(),
})
}
}
_ => self.clone(),
}
}
}
#[cfg(all(feature = "v2", feature = ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
pub use api_models::enums as api_enums;
use api_models::payment_methods;
use crate::{
configs::settings,
core::{payment_methods::transformers as pm_transforms, payments as payments_core},
db::errors::ConnectorError... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
pub use api_models::enums as api_enums;
pub use api_models::enums::Connector;
use api_models::payment_methods;
pub use api_models::{enums::PayoutConnectors, payouts as payout_types};
use hyperswitch_domain_models::payment_meth... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
Ok(response)
}
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
#[derive(Clone, Debug)]
pub struct NetworkTokenPaymentMethodDetails {
network_token_requestor_reference_id: String,
network_token_locker_i... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
storage::PaymentTokenData::WalletToken(_) => storage::PaymentMethodDataWithId {
payment_method: None,
payment_method_data: None,
payment_method_id: None,
},
};
Ok(to... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
fn generate_task_id_for_payment_method_status_update_workflow(
key_id: &str,
runner: storage::ProcessTrackerRunner,
task: &str,
) -> String {
format!("{runner}_{task}_{key_id}")
}
#[cfg(all(
any(feature = ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable_lazy(|| {
format!("Failed to parse the payment method collect link - {}", url)
})?
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
pm,
merchant_key_store,
business_profile,
)
.await?;
Ok((pm_opt.to_owned(), payment_token))
}
_ => Ok((None, None)),
}
}
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.collect();
payment_methods::PaymentMethodListResponse {
payment_methods_enabled: response_payment_methods,
customer_payment_methods,
}
}
}
#[cfg(all(feature = "v2", fe... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
use crate::{
configs::settings,
core::{payment_methods::transformers as pm_transforms, payments as payments_core},
db::errors::ConnectorErrorExt,
headers, logger,
routes::{self, payment_methods as pm_routes... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.serialize_and_set_key_with_expiry(
&payment_method_data::SingleUseTokenKey::get_store_key(&key).into(),
value,
consts::DEFAULT_PAYMENT_METHOD_STORE_TTL,
)
.await
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
let key = payment_method_data::SingleUseTokenKey::store_key(&payment_method.id);
add_single_use_token_to_store(&state, key, value)
.await
.change_context(errors::ApiErrorResponse::InternalServerError)... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
let is_connector_agnostic_mit_enabled =
profile.is_connector_agnostic_mit_enabled.unwrap_or(false);
Ok(Self {
payment_intent,
profile,
collect_cvv_during_payment... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
&merchant_account,
&key_store,
payment_method_update_request,
&request.payment_method_id,
)
.await
.attach_printable("Failed to update saved payment method")?;
Ok(services::Appl... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to update payment methods session in db")?;
let response = transformers::generate_payment_method_session_response(
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to update payment method in db")?;
let response = pm_transforms::generate_payment_method_response(&payment_method, &... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
&state.clone(),
payment_method_data::SingleUseTokenKey::store_key(&pm_id.clone()),
)
.await
.unwrap_or_default();
transformers::generate_payment_method_response(&payment_method, &single_use_tok... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.map(ForeignTryFrom::foreign_try_from)
.collect::<Result<Vec<api::CustomerPaymentMethod>, _>>()
.change_context(errors::ApiErrorResponse::InternalServerError)?;
let response = api::CustomerPaymentM... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
use api_models::payment_methods;
use crate::{
configs::settings,
core::{payment_methods::transformers as pm_transforms, payments as payments_core},
db::errors::ConnectorErrorExt,
headers, logger,
routes::{s... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
use hyperswitch_domain_models::api::{GenericLinks, GenericLinksData};
use hyperswitch_domain_models::mandates::CommonMandateReference;
use hyperswitch_domain_models::payment_method_data;
use hyperswitch_domain_models::payments... | ast_fragments |
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
use crate::{
configs::settings,
core::{payment_methods::transformers as pm_transforms, payments as payments_core},
db::errors::ConnectorErrorExt,
headers, logger,
routes::{self, payment_methods as pm_routes},
services... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
) -> RouterResponse<api::CustomerPaymentMethodsListResponse> {
let customer_payment_methods =
list_customer_payment_method_core(&state, &merchant_account, &key_store, &customer_id)
.await?;
Ok(hype... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
hyperswitch_domain_models::merchant_connector_account::FlattenedPaymentMethodsEnabled::from_payment_connectors_list(payment_connector_accounts)
.perform_filtering()
.get_required_fields(Required... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
})
.attach_printable("PaymentMethodType Required")),
},
None => Err(report!(errors::ApiErrorResponse::MissingRequiredField {
field_name: "payment_method_data"
})
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
format!(
"Failed while inserting PAYMENT_METHOD_STATUS_UPDATE reminder to process_tracker for payment_method_id: {}",
payment_method.get_id().clone()
)
})?;
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
use std::str::FromStr;
use crate::{
configs::settings,
core::{payment_methods::transformers as pm_transforms, payments as payments_core},
db::errors::ConnectorErrorExt,
headers, logger,
routes::{self, payme... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
+ Duration::seconds(pm_collect_link_data.session_expiry.into()),
..Default::default()
};
db.insert_pm_collect_link(pm_collect_link)
.await
.to_duplicate_response(errors::ApiErrorRes... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.unwrap_or(common_utils::consts::DEFAULT_INTENT_FULFILLMENT_TIME);
pm_routes::ParentPaymentMethodToken::create_key_for_token((token, pma.payment_method_type))
.insert(intent_fulfillment_time, t... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
))
.await?;
logger::info!(associated_payments_response=?response);
response
.get_json_body()
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Unexpecte... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
let encrypted_data =
hyperswitch_domain_models::payment_methods::FromRequestEncryptablePaymentMethodSession::from_encryptable(
batch_encrypted_data,
)
.change_context(errors::ApiErro... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
&merchant_account,
&key_store,
req,
payment_method_id,
)
.await?;
Ok(services::ApplicationResponse::Json(response))
}
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
#[... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
.attach_printable("Failed to add payment method in vault")?;
Ok((resp_from_vault, fingerprint_id_from_vault))
}
// TODO: check if this function will be used for listing the customer payment methods for paymen... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
req,
merchant_account,
key_store,
profile,
)
.await?;
Ok(services::ApplicationResponse::Json(response))
}
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
#[instrument(s... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
_ => Err(report!(errors::ApiErrorResponse::UnprocessableEntity {
message: "only card payment methods are supported for tokenization".to_string()
})
.attach_printable("Payment method data is ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
routes::{app::StorageInterface, SessionState},
services,
types::{
domain,
storage::{self, enums as storage_enums},
},
};
const PAYMENT_METHOD_STATUS_UPDATE_TASK: &str = "PAYMENT_METHOD_STATUS_U... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
_payment_method_info: Option<domain::PaymentMethod>,
_business_profile: &domain::Profile,
) -> RouterResult<storage::PaymentMethodDataWithId> {
todo!()
}
#[cfg(all(
any(feature = "v1", feature = "v2"),
not... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payment_methods.rs | crate: router
#[cfg(all(feature = "v2", feature = "customer_v2"))]
pub async fn render_pm_collect_link(
_state: SessionState,
_merchant_account: domain::MerchantAccount,
_key_store: domain::MerchantKeyStore,
_req: payment_m... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use scheduler::{consumer::types::process_data, utils as process_tracker_utils};
use crate::{
consts,
core::{
errors::{sel... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use diesel_models::process_tracker::business_status;
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, Route... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use diesel_models::process_tracker::business_status;
use router_env::{instrument, tracing};
use crate::{
consts,
core::{
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use diesel_models::process_tracker::business_status;
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
... | ast_fragments |
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use std::collections::HashMap;
use api_models::admin::MerchantConnectorInfo;
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use scheduler::{consumer::types::process_data, utils as process_tracker_uti... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use std::collections::HashMap;
use api_models::admin::MerchantConnectorInfo;
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use crate::{
consts,
core::{
errors::{self, ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use api_models::admin::MerchantConnectorInfo;
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
refu... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
pa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
pa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use api_models::admin::MerchantConnectorInfo;
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterRespon... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
refunds::transformers::SplitRefundInput,
u... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
.insert_process(process_tracker_entry)
.await
.to_duplicate_response(errors::ApiErrorResponse::DuplicateRefundRequest)
.attach_printable_lazy(|| {
format!(
"Failed while inse... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
Ok(services::ApplicationResponse::Json(
api_models::refunds::RefundListFilters {
connector: connector_map,
currency: enums::Currency::iter().collect(),
refund_status: enums::RefundStatu... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
refunds::transformers::SplitRefundInput,
u... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
refunds::transformers::SplitRefundInput,
u... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
refunds::transformers::SplitRefundInput,
u... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use api_models::admin::MerchantConnectorInfo;
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use scheduler::{consumer::types::process_data, utils as process_tracker_utils};
use crate::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use diesel_models::process_tracker::business_status;
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, access_token, helpers},
... | ast_fragments |
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use hyperswitch_domain_models::{
router_data::ErrorResponse, router_request_types::SplitRefundsRequest,
};
use hyperswitch_interfaces... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use diesel_models::process_tracker::business_status;
use scheduler::{consumer::types::process_data, utils as process_tracker_utils};
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, Router... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use api_models::admin::MerchantConnectorInfo;
use hyperswitch_domain_models::{
router_data::ErrorResponse, router_request_types::SplitRefundsRequest,
};
use scheduler::{consumer::types::process_data, utils as process_tracker_utils... | ast_fragments |
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use crate::{
consts,
core::{
errors::{self, ConnectorErrorExt, RouterResponse, RouterResult, StorageErrorExt},
payments::{self, ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use error_stack::{report, ResultExt};
use scheduler::{consumer::types::process_data, utils as process_tracker_utils};
use crate::{
co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use error_stack::{report, ResultExt};
use scheduler::{consumer::types::process_data, utils as process_tracker_utils};
use crate::{
co... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use hyperswitch_domain_models::{
router_data::ErrorResponse, router_request_types::SplitRefundsRequest,
};
use hyperswitch_interfaces... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/refunds.rs | crate: router
use common_utils::{
ext_traits::AsyncExt,
types::{ConnectorTransactionId, MinorUnit},
};
use diesel_models::process_tracker::business_status;
use error_stack::{report, ResultExt};
use hyperswitch_domain_models::{
router_da... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use common_enums::PayoutRetryType;
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLinkData, PayoutLinkStatus},
types::{... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLinkData, PayoutLinkStatus},
types::{MinorUnit, UnifiedCode, UnifiedMess... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use diesel_models::{
enums as storage_enums,
generic_link::{GenericLinkNew, PayoutLink},
CommonMandateReference, PayoutsMandateReference, PayoutsMandateReferenceRecord,
};
use crate::types::domain::behaviour::Conversion;
u... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::payments as payment_enums;
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{Generi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::payments as payment_enums;
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLinkData, PayoutLinkStatus},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::payments as payment_enums;
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use diesel_models::{
enums as storage_enums,
generic_link::{GenericLinkNew, PayoutLink},
CommonMandateRefe... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use error_stack::{report, ResultExt};
use scheduler::utils as pt_utils;
use serde_json;
use crate::types::domain::behaviour::Conversion;
use crate::{
core::{... | ast_fragments |
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_enums::PayoutRetryType;
use crate::types::domain::behaviour::Conversion;
use crate::{
core::{
errors::{
self, ConnectorErrorExt, CustomResult... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use error_stack::{report, ResultExt};
use crate::types::domain::behaviour::Conversion;
use crate::{
core::{
errors::{
self, ConnectorErro... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use crate::types::domain::behaviour::Conversion;
use crate::{
core::{
errors::{
self, ConnectorErrorExt, CustomResult, RouterResponse, Ro... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use serde_json;
use crate::types::domain::behaviour::Conversion;
use crate::{
core::{
errors::{
self, ConnectorErrorExt, CustomResult, Ro... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use diesel_models::{
enums as storage_enums,
generic_link::{GenericLinkNew, PayoutLink},
CommonMandateReference, PayoutsMandateReference, PayoutsMand... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
+ Duration::seconds(payout_link_data.session_expiry.into()),
..Default::default()
};
db.insert_payout_link(payout_link)
.await
.to_duplicate_response(errors::ApiErrorResponse::GenericDuplic... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
{
Ok(business_profile)
} else {
db.find_business_profile_by_profile_id(key_manager_state, merchant_key_store, profile_id)
.await
.to_not_found_response(errors::ApiErrorResponse::ProfileN... | ast_fragments |
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLinkData, PayoutLinkStatus},
types::{MinorUnit, UnifiedCode, UnifiedMessage},
};
use cr... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use common_utils::{
consts,
ext_traits::{AsyncExt, ValueExt},
id_type::CustomerId,
link_utils::{GenericLinkStatus, GenericLinkUiConfig, PayoutLin... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/core/payouts.rs | crate: router
use api_models::{self, enums as api_enums, payouts::PayoutLinkResponse};
use hyperswitch_domain_models::payment_methods::PaymentMethod;
use crate::types::domain::behaviour::Conversion;
use crate::{
core::{
errors::{
... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.