mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
feat(connector): [Tokenex]Add external vault insert and retrieve flows (#9470)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -492,6 +492,10 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> {
|
||||
trustpayments::transformers::TrustpaymentsAuthType::try_from(self.auth_type)?;
|
||||
Ok(())
|
||||
}
|
||||
api_enums::Connector::Tokenex => {
|
||||
tokenex::transformers::TokenexAuthType::try_from(self.auth_type)?;
|
||||
Ok(())
|
||||
}
|
||||
api_enums::Connector::Tokenio => {
|
||||
tokenio::transformers::TokenioAuthType::try_from(self.auth_type)?;
|
||||
Ok(())
|
||||
|
||||
@ -550,7 +550,7 @@ pub fn build_unified_connector_service_external_vault_proxy_metadata(
|
||||
}
|
||||
))
|
||||
}
|
||||
api_enums::VaultConnectors::HyperswitchVault => None,
|
||||
api_enums::VaultConnectors::HyperswitchVault | api_enums::VaultConnectors::Tokenex => None,
|
||||
};
|
||||
|
||||
match unified_service_vault_metdata {
|
||||
|
||||
@ -432,6 +432,7 @@ impl ConnectorData {
|
||||
Ok(ConnectorEnum::Old(Box::new(connector::Paystack::new())))
|
||||
}
|
||||
// enums::Connector::Thunes => Ok(ConnectorEnum::Old(Box::new(connector::Thunes))),
|
||||
enums::Connector::Tokenex => Ok(ConnectorEnum::Old(Box::new(&connector::Tokenex))),
|
||||
enums::Connector::Tokenio => {
|
||||
Ok(ConnectorEnum::Old(Box::new(connector::Tokenio::new())))
|
||||
}
|
||||
|
||||
@ -353,6 +353,7 @@ impl FeatureMatrixConnectorData {
|
||||
Ok(ConnectorEnum::Old(Box::new(connector::Paystack::new())))
|
||||
}
|
||||
// enums::Connector::Thunes => Ok(ConnectorEnum::Old(Box::new(connector::Thunes))),
|
||||
enums::Connector::Tokenex => Ok(ConnectorEnum::Old(Box::new(&connector::Tokenex))),
|
||||
enums::Connector::Tokenio => {
|
||||
Ok(ConnectorEnum::Old(Box::new(connector::Tokenio::new())))
|
||||
}
|
||||
|
||||
@ -145,6 +145,11 @@ impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors {
|
||||
api_enums::Connector::Stripe => Self::Stripe,
|
||||
api_enums::Connector::Stripebilling => Self::Stripebilling,
|
||||
// api_enums::Connector::Thunes => Self::Thunes,
|
||||
api_enums::Connector::Tokenex => {
|
||||
Err(common_utils::errors::ValidationError::InvalidValue {
|
||||
message: "Tokenex is not a routable connector".to_string(),
|
||||
})?
|
||||
}
|
||||
api_enums::Connector::Tokenio => Self::Tokenio,
|
||||
api_enums::Connector::Trustpay => Self::Trustpay,
|
||||
api_enums::Connector::Trustpayments => Self::Trustpayments,
|
||||
|
||||
@ -12,8 +12,8 @@ impl utils::Connector for TokenexTest {
|
||||
fn get_data(&self) -> api::ConnectorData {
|
||||
use router::connector::Tokenex;
|
||||
utils::construct_connector_data_old(
|
||||
Box::new(Tokenex::new()),
|
||||
types::Connector::Plaid,
|
||||
Box::new(&Tokenex),
|
||||
types::Connector::Tokenex,
|
||||
api::GetToken::Connector,
|
||||
None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user