repo stringclasses 4
values | file_path stringlengths 6 193 | extension stringclasses 30
values | content stringlengths 0 5.21M | token_count int64 0 3.8M |
|---|---|---|---|---|
hyperswitch | crates/router/tests/utils.rs | .rs | #![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_json, TestRequest},
};
use derive_deref::Deref;
use router::{configs::settings::... | 2,966 |
hyperswitch | crates/router/tests/customers.rs | .rs | #![allow(clippy::unwrap_used, clippy::print_stdout)]
mod utils;
// setting the connector in environment variables doesn't work when run in parallel. Neither does passing the paymentid
// do we'll test refund and payment in same tests and later implement thread_local variables.
// When test-connector feature is enable... | 1,533 |
hyperswitch | crates/router/tests/refunds.rs | .rs | #![allow(clippy::unwrap_used, clippy::print_stdout)]
use utils::{mk_service, AppClient};
mod utils;
// setting the connector in environment variables doesn't work when run in parallel. Neither does passing the paymentid
// do we'll test refund and payment in same tests and later implement thread_local variables.
// ... | 660 |
hyperswitch | crates/router/tests/payments2.rs | .rs | #![allow(
clippy::expect_used,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::print_stdout,
unused_imports
)]
mod utils;
use std::{borrow::Cow, sync::Arc};
use common_utils::{id_type, types::MinorUnit};
use router::{
core::payments,
db::StorageImpl,
types::api::{self, enums as... | 4,036 |
hyperswitch | crates/router/tests/payouts.rs | .rs | #![allow(clippy::unwrap_used, clippy::print_stdout)]
mod utils;
#[actix_web::test]
async fn payouts_todo() {
Box::pin(utils::setup()).await;
let client = awc::Client::default();
let mut response;
let mut response_body;
let get_endpoints = vec!["retrieve", "accounts"];
let post_endpoints = vec... | 291 |
hyperswitch | crates/router/tests/services.rs | .rs | use std::sync::{atomic, Arc};
use router::{configs::settings::Settings, routes, services};
mod utils;
#[tokio::test]
#[should_panic]
#[allow(clippy::unwrap_used)]
async fn get_redis_conn_failure() {
// Arrange
utils::setup().await;
let (tx, _) = tokio::sync::oneshot::channel();
let app_state = Box::p... | 402 |
hyperswitch | crates/router/tests/macros.rs | .rs | #[cfg(test)]
mod flat_struct_test {
#![allow(clippy::unwrap_used)]
use std::collections::HashMap;
use router_derive::FlatStruct;
use serde::Serialize;
#[test]
fn test_flat_struct() {
#[derive(FlatStruct, Serialize)]
struct User {
address: Address,
}
... | 252 |
hyperswitch | crates/router/tests/connectors/fiserv.rs | .rs | use std::str::FromStr;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use serde_json::json;
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct FiservTest;
impl ConnectorActions for FiservTest {}
impl utils::Connector for FiservTest {
fn... | 3,595 |
hyperswitch | crates/router/tests/connectors/checkout.rs | .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 {
fn get_data(&self) -> types::api::Connector... | 3,004 |
hyperswitch | crates/router/tests/connectors/bluesnap.rs | .rs | use std::str::FromStr;
use common_utils::pii::Email;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, domain, storage::enums, ConnectorAuthType, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
#[de... | 3,550 |
hyperswitch | crates/router/tests/connectors/payu.rs | .rs | use masking::PeekInterface;
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
use crate::{
connector_auth,
utils::{self, Connector, ConnectorActions, PaymentAuthorizeType},
};
struct Payu;
impl ConnectorActions for Payu {}
impl Connector for Payu {
fn get_data(&self) -> typ... | 3,035 |
hyperswitch | crates/router/tests/connectors/bitpay.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct BitpayTest;
impl ConnectorActions for Bit... | 1,149 |
hyperswitch | crates/router/tests/connectors/stripe.rs | .rs | use std::str::FromStr;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
struct Stripe;
impl ConnectorActions for Stripe {}
impl utils::Connector for Stripe {
fn get_data(&self) -> types::api::ConnectorData {
u... | 2,809 |
hyperswitch | crates/router/tests/connectors/iatapay.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, storage::enums, AccessToken};
use crate::{
connector_auth,
utils::{
self, get_connector_transaction_id, Connector, ConnectorActions, PaymentAuthorizeType,
},
};
#[de... | 1,333 |
hyperswitch | crates/router/tests/connectors/opennode.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct OpennodeTest;
impl ConnectorActions for OpennodeTest {}
i... | 1,346 |
hyperswitch | crates/router/tests/connectors/globepay.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct GlobepayTest;
impl ConnectorActions for GlobepayTest {}
impl utils::Connector for GlobepayTest {
fn get_data(&self) -> types::api::Connecto... | 2,925 |
hyperswitch | crates/router/tests/connectors/coinbase.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use serde_json::json;
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct CoinbaseTest;
impl ... | 1,398 |
hyperswitch | crates/router/tests/connectors/coingate.rs | .rs | use masking::Secret;
use router::types::{self, api, storage::enums};
use crate::utils::{self, ConnectorActions};
use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct CoingateTest;
impl ConnectorActions for CoingateTest {}
impl utils::Connector for CoingateTest {
fn get_data(&self) -> api::ConnectorData {... | 2,934 |
hyperswitch | crates/router/tests/connectors/powertranz.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct PowertranzTest;
impl ConnectorActions for PowertranzTest {}
impl utils::Connector for PowertranzTest {
fn get_data(&self) -> types::api::Co... | 2,926 |
hyperswitch | crates/router/tests/connectors/jpmorgan.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct JpmorganTest;
impl JpmorganTest {
#[allow(dead_code)]
fn... | 2,947 |
hyperswitch | crates/router/tests/connectors/novalnet.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct NovalnetTest;
impl ConnectorActions for NovalnetTest {}
impl uti... | 2,923 |
hyperswitch | crates/router/tests/connectors/trustpay.rs | .rs | use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, BrowserInformation};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct TrustpayTest;
impl Connecto... | 1,738 |
hyperswitch | crates/router/tests/connectors/paybox.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct PayboxTest;
impl ConnectorActions for PayboxTest {}
impl utils::Connector for PayboxTest {
fn get_data(&self) -> api::ConnectorData... | 2,912 |
hyperswitch | crates/router/tests/connectors/volt.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct VoltTest;
impl ConnectorActions for VoltTest {}
impl utils::Connector for VoltTest {
fn get_data(&self) -> types::api::ConnectorData {
... | 2,904 |
hyperswitch | crates/router/tests/connectors/noon.rs | .rs | use std::str::FromStr;
use masking::Secret;
use router::types::{self, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct NoonTest;
impl ConnectorActions for NoonTest {}
impl utils::Connector for NoonTest {
fn get_data(&self) -> types::api::Conn... | 3,119 |
hyperswitch | crates/router/tests/connectors/rapyd.rs | .rs | use std::str::FromStr;
use futures::future::OptionFuture;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use serial_test::serial;
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
struct Rapyd;
impl ConnectorActions for Rapyd {}
impl utils::Connector for R... | 1,343 |
hyperswitch | crates/router/tests/connectors/fiservemea.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct FiservemeaTest;
impl ConnectorActions for FiservemeaTest {}
impl... | 2,940 |
hyperswitch | crates/router/tests/connectors/nuvei.rs | .rs | use std::str::FromStr;
use masking::Secret;
use router::types::{self, storage::enums};
use serde_json::json;
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct NuveiTest;
impl ConnectorActions for NuveiTest {}
impl utils::Connector for NuveiTest {
fn get_data(&... | 2,740 |
hyperswitch | crates/router/tests/connectors/worldpay.rs | .rs | use futures::future::OptionFuture;
use router::types::{self, domain, storage::enums};
use serde_json::json;
use serial_test::serial;
use wiremock::{
matchers::{body_json, method, path},
Mock, ResponseTemplate,
};
use crate::{
connector_auth,
utils::{self, ConnectorActions, LocalMock, MockConfig},
};
s... | 2,748 |
hyperswitch | crates/router/tests/connectors/payone.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct PayoneTest;
impl ConnectorActions for PayoneTest {}
impl utils::Connector for PayoneTest {
fn get_data(&self) -> types::api::ConnectorDa... | 2,914 |
hyperswitch | crates/router/tests/connectors/billwerk.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct BillwerkTest;
impl ConnectorActions for BillwerkTest {}
impl utils::Connector for BillwerkTest {
fn get_data(&self) -> types::api::Conne... | 2,930 |
hyperswitch | crates/router/tests/connectors/getnet.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct GetnetTest;
impl ConnectorActions for GetnetTest {}
impl utils::... | 2,913 |
hyperswitch | crates/router/tests/connectors/hipay.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct HipayTest;
impl ConnectorActions for HipayTest {}
impl utils::Co... | 2,913 |
hyperswitch | crates/router/tests/connectors/cashtocode.rs | .rs | use common_utils::id_type;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct CashtocodeTest;
impl ConnectorActions for CashtocodeTest {}
impl utils... | 871 |
hyperswitch | crates/router/tests/connectors/dummyconnector.rs | .rs | use std::str::FromStr;
use cards::CardNumber;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct DummyConnectorTest;
impl ConnectorActions for DummyConnectorTest {}
impl utils::Connector for... | 3,090 |
hyperswitch | crates/router/tests/connectors/cybersource.rs | .rs | use std::str::FromStr;
use common_utils::pii::Email;
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentAuthorizeType},
};
struct Cyber... | 2,868 |
hyperswitch | crates/router/tests/connectors/bambora.rs | .rs | use std::str::FromStr;
use common_utils::types::MinorUnit;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct BamboraTest;
impl ConnectorActions for BamboraTest {}
impl utils::Connector for Bam... | 3,340 |
hyperswitch | crates/router/tests/connectors/dlocal.rs | .rs | #![allow(clippy::print_stdout)]
use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
#[derive(Clone,... | 3,212 |
hyperswitch | crates/router/tests/connectors/bankofamerica.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct BankofamericaTest;
impl ConnectorActions for BankofamericaTest {}
impl utils::Connector for BankofamericaTest {
fn get_data(&self) -> ty... | 2,956 |
hyperswitch | crates/router/tests/connectors/fiuu.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct FiuuTest;
impl ConnectorActions for FiuuTest {}
impl utils::Conn... | 2,920 |
hyperswitch | crates/router/tests/connectors/authorizedotnet.rs | .rs | use std::str::FromStr;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
#[derive(Clone, Copy)]
struct AuthorizedotnetTest;
impl ConnectorActions for AuthorizedotnetTest {}
impl utils::Connector for Authorized... | 4,209 |
hyperswitch | crates/router/tests/connectors/adyen.rs | .rs | use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
#[derive(Clone, Copy)]
struct AdyenTest;
impl C... | 4,925 |
hyperswitch | crates/router/tests/connectors/redsys.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct RedsysTest;
impl ConnectorActions for RedsysTest {}
impl utils::... | 2,914 |
hyperswitch | crates/router/tests/connectors/prophetpay.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct ProphetpayTest;
impl ConnectorActions for ProphetpayTest {}
impl utils::Connector for ProphetpayTest {
fn get_data(&self) -> types::api:... | 2,917 |
hyperswitch | crates/router/tests/connectors/datatrans.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct DatatransTest;
impl ConnectorActions for DatatransTest {}
impl utils::Connector for DatatransTest {
fn get_data(&self) -> api::Conn... | 2,919 |
hyperswitch | crates/router/tests/connectors/elavon.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct ElavonTest;
impl ConnectorActions for ElavonTest {}
impl utils::... | 2,986 |
hyperswitch | crates/router/tests/connectors/inespay.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct InespayTest;
impl ConnectorActions for InespayTest {}
impl utils... | 2,920 |
hyperswitch | crates/router/tests/connectors/mollie.rs | .rs | use router::types;
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[allow(dead_code)]
#[derive(Clone, Copy)]
struct MollieTest;
impl ConnectorActions for MollieTest {}
impl utils::Connector for MollieTest {
fn get_data(&self) -> types::api::ConnectorData {
use router::connector::... | 203 |
hyperswitch | crates/router/tests/connectors/adyenplatform.rs | .rs | 1 | |
hyperswitch | crates/router/tests/connectors/utils.rs | .rs | use std::{fmt::Debug, marker::PhantomData, str::FromStr, sync::Arc, time::Duration};
use async_trait::async_trait;
use common_utils::pii::Email;
use error_stack::Report;
use masking::Secret;
#[cfg(feature = "payouts")]
use router::core::utils as core_utils;
use router::{
configs::settings::Settings,
core::{err... | 9,311 |
hyperswitch | crates/router/tests/connectors/tsys.rs | .rs | use std::{str::FromStr, time::Duration};
use cards::CardNumber;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct TsysTest;
impl ConnectorActions for TsysTest {}
impl utils::Connector for Tsys... | 3,301 |
hyperswitch | crates/router/tests/connectors/forte.rs | .rs | use std::{str::FromStr, time::Duration};
use cards::CardNumber;
use common_utils::types::MinorUnit;
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, Connector... | 4,954 |
hyperswitch | crates/router/tests/connectors/recurly.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct RecurlyTest;
impl ConnectorActions for RecurlyTest {}
impl utils... | 2,922 |
hyperswitch | crates/router/tests/connectors/placetopay.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct PlacetopayTest;
impl ConnectorActions for PlacetopayTest {}
impl utils::Connector for PlacetopayTest {
fn get_data(&self) -> types::api:... | 2,934 |
hyperswitch | crates/router/tests/connectors/square.rs | .rs | use std::{str::FromStr, time::Duration};
use masking::Secret;
use router::types::{self, storage::enums, PaymentsResponseData};
use test_utils::connector_auth::ConnectorAuthentication;
use crate::utils::{self, get_connector_transaction_id, Connector, ConnectorActions};
#[derive(Clone, Copy)]
struct SquareTest;
impl C... | 4,143 |
hyperswitch | crates/router/tests/connectors/worldline.rs | .rs | use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::{
connector::Worldline,
core::errors,
types::{self, storage::enums, PaymentAddress},
};
use crate::{
connector_auth::ConnectorAuthentication,
utils::{self, ConnectorActions, P... | 2,958 |
hyperswitch | crates/router/tests/connectors/deutschebank.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct DeutschebankTest;
impl ConnectorActions for DeutschebankTest {}
... | 2,918 |
hyperswitch | crates/router/tests/connectors/mifinity.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct MifinityTest;
impl ConnectorActions for MifinityTest {}
impl utils::Connector for MifinityTest {
fn get_data(&self) -> types::api::Conne... | 2,923 |
hyperswitch | crates/router/tests/connectors/facilitapay.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct FacilitapayTest;
impl ConnectorActions for FacilitapayTest {}
im... | 2,932 |
hyperswitch | crates/router/tests/connectors/ebanx.rs | .rs | use masking::Secret;
use router::types::{self, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct EbanxTest;
impl ConnectorActions for EbanxTest {}
impl utils::Connector for EbanxTest {
fn get_data(&self) -> types::api::ConnectorData {
... | 2,933 |
hyperswitch | crates/router/tests/connectors/moneris.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct MonerisTest;
impl ConnectorActions for MonerisTest {}
impl utils... | 2,923 |
hyperswitch | crates/router/tests/connectors/payme.rs | .rs | use std::str::FromStr;
use common_utils::{pii::Email, types::MinorUnit};
use diesel_models::types::OrderDetailsWithAmount;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
uti... | 3,981 |
hyperswitch | crates/router/tests/connectors/nexinets.rs | .rs | use std::str::FromStr;
use cards::CardNumber;
use common_utils::types::MinorUnit;
use masking::Secret;
use router::types::{self, domain, storage::enums, PaymentsAuthorizeData};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct NexinetsTest;
impl ConnectorActions f... | 4,976 |
hyperswitch | crates/router/tests/connectors/xendit.rs | .rs | use masking::Secret;
use router::{
types::{self, api, storage::enums,
}};
use crate::utils::{self, ConnectorActions};
use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct XenditTest;
impl ConnectorActions for XenditTest {}
impl utils::Connector for XenditTest {
fn get_data(&self) -> api::ConnectorDat... | 2,896 |
hyperswitch | crates/router/tests/connectors/multisafepay.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
#[derive(Clone, Copy)]
struct MultisafepayTest;
impl ConnectorActions for Mul... | 3,169 |
hyperswitch | crates/router/tests/connectors/stripebilling.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct StripebillingTest;
impl ConnectorActions for StripebillingTest {... | 2,914 |
hyperswitch | crates/router/tests/connectors/globalpay.rs | .rs | use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, AccessToken, ConnectorAuthType};
use serde_json::json;
use crate::{
connector_auth,
utils::{self, Connector, ConnectorActions, PaymentInfo},
};
... | 2,990 |
hyperswitch | crates/router/tests/connectors/main.rs | .rs | #![allow(
clippy::expect_used,
clippy::panic,
clippy::unwrap_in_result,
clippy::unwrap_used
)]
use test_utils::connector_auth;
mod aci;
mod adyen;
mod adyenplatform;
mod airwallex;
mod amazonpay;
mod authorizedotnet;
mod bambora;
mod bamboraapac;
#[cfg(feature = "dummy_connector")]
mod bankofamerica;
#... | 491 |
hyperswitch | crates/router/tests/connectors/amazonpay.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct AmazonpayTest;
impl ConnectorActions for AmazonpayTest {}
impl u... | 2,915 |
hyperswitch | crates/router/tests/connectors/gpayments.rs | .rs | use router::types;
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
#[allow(dead_code)]
struct GpaymentsTest;
impl ConnectorActions for GpaymentsTest {}
impl utils::Connector for GpaymentsTest {
fn get_data(&self) -> types::api::ConnectorData {
use router:... | 213 |
hyperswitch | crates/router/tests/connectors/nmi.rs | .rs | use std::{str::FromStr, time::Duration};
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
struct NmiTest;
impl ConnectorActions for NmiTest {}
impl utils::Connector for NmiTest {
fn get_data(&self) -> types::api::ConnectorData {
u... | 4,874 |
hyperswitch | crates/router/tests/connectors/zen.rs | .rs | use std::str::FromStr;
use cards::CardNumber;
use common_utils::{pii::Email, types::MinorUnit};
use hyperswitch_domain_models::types::OrderDetailsWithAmount;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone... | 4,053 |
hyperswitch | crates/router/tests/connectors/wellsfargopayout.rs | .rs | use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct WellsfargopayoutTest;
impl ConnectorActions for WellsfargopayoutTest {}
impl utils::Connector for WellsfargopayoutTest {
fn get_data(&self)... | 2,958 |
hyperswitch | crates/router/tests/connectors/gocardless.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct GocardlessTest;
impl ConnectorActions for GocardlessTest {}
impl utils::Connector for GocardlessTest {
fn get_data(&self) -> types::api:... | 2,922 |
hyperswitch | crates/router/tests/connectors/itaubank.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct ItaubankTest;
impl ConnectorActions for ItaubankTest {}
impl utils::Connector for ItaubankTest {
fn get_data(&self) -> api::Connect... | 2,921 |
hyperswitch | crates/router/tests/connectors/netcetera.rs | .rs | use router::types::{self, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct NetceteraTest;
impl ConnectorActions for NetceteraTest {}
impl utils::Connector for NetceteraTest {
fn get_data(&self) -> types::api::ConnectorData {
use rou... | 2,463 |
hyperswitch | crates/router/tests/connectors/chargebee.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct ChargebeeTest;
impl ConnectorActions for ChargebeeTest {}
impl u... | 2,914 |
hyperswitch | crates/router/tests/connectors/razorpay.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct RazorpayTest;
impl ConnectorActions for RazorpayTest {}
impl utils::Connector for RazorpayTest {
fn get_data(&self) -> types::api::Conne... | 2,918 |
hyperswitch | crates/router/tests/connectors/wise.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::{
types,
types::{api, storage::enums, PaymentAddress},
};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
struct WiseTest;
impl ConnectorActions for WiseTest {}
impl util... | 1,062 |
hyperswitch | crates/router/tests/connectors/paystack.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct PaystackTest;
impl ConnectorActions for PaystackTest {}
impl uti... | 2,914 |
hyperswitch | crates/router/tests/connectors/bamboraapac.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct BamboraapacTest;
impl ConnectorActions for BamboraapacTest {}
impl utils::Connector for BamboraapacTest {
fn get_data(&self) -> api... | 2,933 |
hyperswitch | crates/router/tests/connectors/payeezy.rs | .rs | use std::str::FromStr;
use cards::CardNumber;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::{
core::errors,
types::{self, storage::enums, PaymentsAuthorizeData},
};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
#[de... | 3,878 |
hyperswitch | crates/router/tests/connectors/boku.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct BokuTest;
impl ConnectorActions for BokuTest {}
impl utils::Connector for BokuTest {
fn get_data(&self) -> types::api::ConnectorData {
... | 2,913 |
hyperswitch | crates/router/tests/connectors/thunes.rs | .rs | use masking::Secret;
// use router::{
// types::{self, api, storage::enums,
// }};
use crate::utils::{self, ConnectorActions};
use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct ThunesTest;
impl ConnectorActions for ThunesTest {}
impl utils::Connector for ThunesTest {
fn get_data(&self) -> api::Con... | 2,890 |
hyperswitch | crates/router/tests/connectors/shift4.rs | .rs | use std::str::FromStr;
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct Shift4Test;
impl ConnectorActions for Shift4Test {}
impl utils::Connector for Shift4Test {
fn get_data(&self) -> ty... | 2,845 |
hyperswitch | crates/router/tests/connectors/taxjar.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct TaxjarTest;
impl ConnectorActions for TaxjarTest {}
impl utils::Connector for TaxjarTest {
fn get_data(&self) -> api::ConnectorData... | 2,912 |
hyperswitch | crates/router/tests/connectors/wellsfargo.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct WellsfargoTest;
impl ConnectorActions for WellsfargoTest {}
impl utils::Connector for WellsfargoTest {
fn get_data(&self) -> api::C... | 2,926 |
hyperswitch | crates/router/tests/connectors/nexixpay.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct NexixpayTest;
impl ConnectorActions for NexixpayTest {}
impl uti... | 2,924 |
hyperswitch | crates/router/tests/connectors/helcim.rs | .rs | use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct HelcimTest;
impl ConnectorActions for HelcimTest {}
impl utils::Connector for HelcimTest {
fn get_data(&self) -> types::api::ConnectorDa... | 2,924 |
hyperswitch | crates/router/tests/connectors/paypal.rs | .rs | use std::str::FromStr;
use common_utils::types::MinorUnit;
use masking::Secret;
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
use crate::{
connector_auth,
utils::{self, Connector, ConnectorActions},
};
struct PaypalTest;
impl ConnectorActions for PaypalTest {}
impl Connec... | 4,660 |
hyperswitch | crates/router/tests/connectors/unified_authentication_service.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct UnifiedAuthenticationServiceTest;
impl ConnectorActions for Unif... | 2,925 |
hyperswitch | crates/router/tests/connectors/airwallex.rs | .rs | use std::str::FromStr;
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::{PeekInterface, Secret};
use router::types::{self, domain, storage::enums, AccessToken};
use crate::{
connector_auth,
utils::{self, Connector, ConnectorActions},
};
#[derive(Clone, Copy)]
struct AirwallexTe... | 3,666 |
hyperswitch | crates/router/tests/connectors/sample_auth.toml | .toml | # Copy this file and rename it as `auth.toml`
# Each of the connector's section is optional
[aci]
api_key = "Bearer MyApiKey"
key1 = "MyEntityId"
[adyen]
api_key = "Bearer MyApiKey"
key1 = "MerchantId"
api_secret = "Secondary key"
[amazonpay]
api_key="API Key"
[authorizedotnet]
api_key = "MyMerchantName"
key1 = "My... | 1,407 |
hyperswitch | crates/router/tests/connectors/stax.rs | .rs | use std::{str::FromStr, time::Duration};
use masking::Secret;
use router::types::{self, domain, storage::enums, PaymentsResponseData};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct StaxTest;
impl ConnectorActions for StaxTest {}
impl utils::Connector for St... | 4,650 |
hyperswitch | crates/router/tests/connectors/digitalvirgo.rs | .rs | use masking::Secret;
use router::{
types::{self, api, storage::enums,
}};
use crate::utils::{self, ConnectorActions};
use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct DigitalvirgoTest;
impl ConnectorActions for DigitalvirgoTest {}
impl utils::Connector for DigitalvirgoTest {
fn get_data(&self) ->... | 2,897 |
hyperswitch | crates/router/tests/connectors/cryptopay.rs | .rs | use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy)]
struct CryptopayTest;
impl ConnectorActions for ... | 1,181 |
hyperswitch | crates/router/tests/connectors/nomupay.rs | .rs | use api_models::payments::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, api, storage::enums, PaymentAddress};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions, PaymentInfo};
#[derive(Clone, Copy)]
struct NomupayTest;
impl ConnectorActions for NomupayTest {}
impl u... | 1,045 |
hyperswitch | crates/router/tests/connectors/aci.rs | .rs | #![allow(clippy::print_stdout)]
use std::{borrow::Cow, marker::PhantomData, str::FromStr, sync::Arc};
use common_utils::id_type;
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::{
configs::settings::Settings,
core::payments,
db::StorageImpl,... | 3,344 |
hyperswitch | crates/router/tests/connectors/plaid.rs | .rs | use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, Connector, ConnectorActions};
#[derive(Clone, Copy)]
struct PlaidTest;
impl ConnectorActions for PlaidTest {}
static CONNECTOR: PlaidTest = PlaidTest {};
impl Connector for PlaidTest... | 2,909 |
hyperswitch | crates/router/tests/connectors/juspaythreedsserver.rs | .rs | use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct JuspaythreedsserverTest;
impl JuspaythreedsserverTest {
#[al... | 2,987 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.