diff --git a/crates/hyperswitch_connectors/src/connectors/bankofamerica.rs b/crates/hyperswitch_connectors/src/connectors/bankofamerica.rs index 40c45219b327..f15085cf75cc 100644 --- a/crates/hyperswitch_connectors/src/connectors/bankofamerica.rs +++ b/crates/hyperswitch_connectors/src/connectors/bankofamerica.rs @@ -1,10 +1,7 @@ pub mod transformers; -use crate::{ - constants::headers, - types::ResponseRouterData, - utils::{self, PaymentMethodDataType, RefundsRequestData}, -}; +use std::fmt::Debug; + use base64::Engine; use common_enums::enums; use common_utils::{ @@ -14,7 +11,6 @@ use common_utils::{ request::{Method, Request, RequestBuilder, RequestContent}, }; use error_stack::{report, ResultExt}; -use hyperswitch_domain_models::types::RefundsRouterData; use hyperswitch_domain_models::{ payment_method_data::PaymentMethodData, router_data::{AccessToken, ErrorResponse, RouterData}, @@ -31,7 +27,7 @@ use hyperswitch_domain_models::{ router_response_types::{PaymentsResponseData, RefundsResponseData}, types::{ PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData, - PaymentsSyncRouterData, RefundSyncRouterData, SetupMandateRouterData, + PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData, SetupMandateRouterData, }, }; use hyperswitch_interfaces::{ @@ -47,11 +43,16 @@ use hyperswitch_interfaces::{ }; use masking::{ExposeInterface, Mask, Maskable, PeekInterface}; use ring::{digest, hmac}; -use std::fmt::Debug; use time::OffsetDateTime; use transformers as bankofamerica; use url::Url; +use crate::{ + constants::headers, + types::ResponseRouterData, + utils::{self, PaymentMethodDataType, RefundsRequestData}, +}; + pub const V_C_MERCHANT_ID: &str = "v-c-merchant-id"; #[derive(Debug, Clone)] diff --git a/crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs b/crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs index 0178fa0634c0..ca93b12870eb 100644 --- a/crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs @@ -1,20 +1,6 @@ -use crate::{ - types::{RefundsResponseRouterData, ResponseRouterData}, - unimplemented_payment_method, - utils::{ - self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData, - PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData, - RouterData as OtherRouterData, - }, -}; use base64::Engine; use common_enums::{enums, FutureUsage}; -use common_utils::consts; -use common_utils::pii; -use masking::{ExposeInterface, PeekInterface, Secret}; -use serde::{Deserialize, Serialize}; -use serde_json::Value; - +use common_utils::{consts, pii}; use hyperswitch_domain_models::{ payment_method_data::{ApplePayWalletData, GooglePayWalletData, PaymentMethodData, WalletData}, router_data::{ @@ -33,7 +19,20 @@ use hyperswitch_domain_models::{ }, }; use hyperswitch_interfaces::{api, errors}; +use masking::{ExposeInterface, PeekInterface, Secret}; +use serde::{Deserialize, Serialize}; +use serde_json::Value; use utils::ForeignFrom; + +use crate::{ + types::{RefundsResponseRouterData, ResponseRouterData}, + unimplemented_payment_method, + utils::{ + self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData, + PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData, + RouterData as OtherRouterData, + }, +}; pub struct BankOfAmericaAuthType { pub(super) api_key: Secret, pub(super) merchant_account: Secret, diff --git a/crates/hyperswitch_connectors/src/connectors/cybersource.rs b/crates/hyperswitch_connectors/src/connectors/cybersource.rs index ce9f42e626ba..aecdd82863e7 100644 --- a/crates/hyperswitch_connectors/src/connectors/cybersource.rs +++ b/crates/hyperswitch_connectors/src/connectors/cybersource.rs @@ -2,14 +2,12 @@ pub mod transformers; use base64::Engine; use common_enums::enums; -use common_utils::types::{ - AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector, -}; use common_utils::{ consts, errors::CustomResult, ext_traits::BytesExt, request::{Method, Request, RequestBuilder, RequestContent}, + types::{AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector}, }; use error_stack::{report, Report, ResultExt}; use hyperswitch_domain_models::{ diff --git a/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs index 4b418840637c..ab97be52bed9 100644 --- a/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs @@ -1,7 +1,6 @@ use api_models::payments; #[cfg(feature = "payouts")] use api_models::payouts::PayoutMethodData; - use base64::Engine; use common_enums::{enums, FutureUsage}; use common_utils::{ @@ -46,12 +45,10 @@ use serde::{Deserialize, Serialize}; use serde_json::Value; use utils::{ForeignFrom, ForeignTryFrom}; -#[cfg(feature = "payouts")] -use crate::utils::PayoutsData; - #[cfg(feature = "payouts")] use crate::types::PayoutsResponseRouterData; - +#[cfg(feature = "payouts")] +use crate::utils::PayoutsData; use crate::{ types::{RefundsResponseRouterData, ResponseRouterData}, unimplemented_payment_method, diff --git a/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs b/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs index a95aad31345c..912b9d069d66 100644 --- a/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs +++ b/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs @@ -2,14 +2,12 @@ pub mod transformers; use base64::Engine; use common_enums::enums; -use common_utils::types::{ - AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector, -}; use common_utils::{ consts, errors::CustomResult, ext_traits::BytesExt, request::{Method, Request, RequestBuilder, RequestContent}, + types::{AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector}, }; use error_stack::{report, Report, ResultExt}; use hyperswitch_domain_models::{ diff --git a/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs b/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs index 62790f8cdbad..cadcfb793132 100644 --- a/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs +++ b/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs @@ -1,17 +1,5 @@ use api_models::payments; use base64::Engine; -use masking::{ExposeInterface, PeekInterface, Secret}; -use serde_json::Value; - -use crate::{ - types::{RefundsResponseRouterData, ResponseRouterData}, - unimplemented_payment_method, - utils::{ - self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData, - PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData, - RouterData as OtherRouterData, - }, -}; use common_enums::{enums, FutureUsage}; use common_utils::{ consts, pii, @@ -41,9 +29,21 @@ use hyperswitch_domain_models::{ }, }; use hyperswitch_interfaces::{api, errors}; +use masking::{ExposeInterface, PeekInterface, Secret}; use serde::{Deserialize, Serialize}; +use serde_json::Value; use utils::{ForeignFrom, ForeignTryFrom}; +use crate::{ + types::{RefundsResponseRouterData, ResponseRouterData}, + unimplemented_payment_method, + utils::{ + self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData, + PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData, + RouterData as OtherRouterData, + }, +}; + #[derive(Debug, Serialize)] pub struct WellsfargoRouterData { pub amount: StringMajorUnit, diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs index ca4ace954cdc..485ff86d7284 100644 --- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs +++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs @@ -257,8 +257,9 @@ default_imp_for_new_connector_integration_payment!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -403,8 +404,9 @@ default_imp_for_new_connector_integration_connector_access_token!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -478,8 +480,9 @@ default_imp_for_new_connector_integration_accept_dispute!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -552,8 +555,9 @@ default_imp_for_new_connector_integration_submit_evidence!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -627,8 +631,9 @@ default_imp_for_new_connector_integration_defend_dispute!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -712,8 +717,9 @@ default_imp_for_new_connector_integration_file_upload!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -789,8 +795,9 @@ default_imp_for_new_connector_integration_payouts_create!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -866,8 +873,9 @@ default_imp_for_new_connector_integration_payouts_eligibility!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -943,8 +951,9 @@ default_imp_for_new_connector_integration_payouts_fulfill!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1020,8 +1029,9 @@ default_imp_for_new_connector_integration_payouts_cancel!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1097,8 +1107,9 @@ default_imp_for_new_connector_integration_payouts_quote!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1174,8 +1185,9 @@ default_imp_for_new_connector_integration_payouts_recipient!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1251,8 +1263,9 @@ default_imp_for_new_connector_integration_payouts_sync!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1328,8 +1341,9 @@ default_imp_for_new_connector_integration_payouts_recipient_account!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1403,8 +1417,9 @@ default_imp_for_new_connector_integration_webhook_source_verification!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1480,8 +1495,9 @@ default_imp_for_new_connector_integration_frm_sale!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1557,8 +1573,9 @@ default_imp_for_new_connector_integration_frm_checkout!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1634,8 +1651,9 @@ default_imp_for_new_connector_integration_frm_transaction!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1711,8 +1729,9 @@ default_imp_for_new_connector_integration_frm_fulfillment!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1788,8 +1807,9 @@ default_imp_for_new_connector_integration_frm_record_return!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); @@ -1862,8 +1882,9 @@ default_imp_for_new_connector_integration_revoking_mandates!( connectors::UnifiedAuthenticationService, connectors::Worldline, connectors::Volt, -connectors::Worldpay, -connectors::Wellsfargo, connectors::Xendit, + connectors::Worldpay, + connectors::Wellsfargo, + connectors::Xendit, connectors::Zen, connectors::Zsl ); diff --git a/crates/hyperswitch_domain_models/src/types.rs b/crates/hyperswitch_domain_models/src/types.rs index f8da4bbad28c..4bbab24edfeb 100644 --- a/crates/hyperswitch_domain_models/src/types.rs +++ b/crates/hyperswitch_domain_models/src/types.rs @@ -25,7 +25,6 @@ use crate::{ TaxCalculationResponseData, }, }; - #[cfg(feature = "payouts")] pub use crate::{router_request_types::PayoutsData, router_response_types::PayoutsResponseData};