Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(connector): update the `connector_template` (#1895)

Amisha Prabhat5fe96d4d9683
diff --git a/connector-template/mod.rs b/connector-template/mod.rs
index 67745e8b4c..af58abbf92 100644
--- a/connector-template/mod.rs
+++ b/connector-template/mod.rs
@@ -1,4 +1,4 @@
-mod transformers;
+pub mod transformers;
use std::fmt::Debug;
use error_stack::{ResultExt, IntoReport};
@@ -77,14 +77,6 @@ impl ConnectorCommon for {{project-name | downcase | pascal_case}} {
fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
connectors.{{project-name}}.base_url.as_ref()
}
-
- fn validate_auth_type(
- &self,
- val: &types::ConnectorAuthType,
- ) -> Result<(), error_stack::Report<errors::ConnectorError>> {
- {{project-name | downcase}}::{{project-name | downcase | pascal_case}}AuthType::try_from(val)?;
- Ok(())
- }
fn get_auth_header(&self, auth_type:&types::ConnectorAuthType)-> CustomResult<Vec<(String,request::Maskable<String>)>,errors::ConnectorError> {
let auth = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}AuthType::try_from(auth_type)