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

feat(core): add Interpayments in routable connectors (#12486)

Swangi Kumarid913053f3adb
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 13a66498c9..a9a46d09a3 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -39828,6 +39828,7 @@
"iatapay",
"imerchantsolutions",
"inespay",
+ "interpayments",
"itaubank",
"jpmorgan",
"klarna",
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index 733606e1ce..9f9ad8d372 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -29256,6 +29256,7 @@
"iatapay",
"imerchantsolutions",
"inespay",
+ "interpayments",
"itaubank",
"jpmorgan",
"klarna",
diff --git a/crates/euclid/src/enums.rs b/crates/euclid/src/enums.rs
index 07e0d58078..81a4c5e84b 100644
--- a/crates/euclid/src/enums.rs
+++ b/crates/euclid/src/enums.rs
@@ -284,6 +284,7 @@ pub enum RoutableConnectors {
Iatapay,
Imerchantsolutions,
Inespay,
+ Interpayments,
Itaubank,
Jpmorgan,
Klarna,
@@ -445,6 +446,7 @@ impl TryFrom<Connector> for RoutableConnectors {
Connector::Hyperpg => Ok(Self::Hyperpg),
Connector::Iatapay => Ok(Self::Iatapay),
Connector::Imerchantsolutions => Ok(Self::Imerchantsolutions),
+ Connector::Interpayments => Ok(Self::Interpayments),
Connector::Itaubank => Ok(Self::Itaubank),
Connector::Jpmorgan => Ok(Self::Jpmorgan),
Connector::Klarna => Ok(Self::Klarna),
@@ -522,7 +524,6 @@ impl TryFrom<Connector> for RoutableConnectors {
| Connector::Juspaythreedsserver
| Connector::Netcetera
| Connector::Taxjar
- | Connector::Interpayments
| Connector::Threedsecureio
| Connector::Vgs
| Connector::CtpVisa
@@ -609,6 +610,7 @@ impl From<RoutableConnectors> for Connector {
RoutableConnectors::Hyperpg => Self::Hyperpg,
RoutableConnectors::Iatapay => Self::Iatapay,
RoutableConnectors::Imerchantsolutions => Self::Imerchantsolutions,
+ RoutableConnectors::Interpayments => Self::Interpayments,
RoutableConnectors::Itaubank => Self::Itaubank,
RoutableConnectors::Jpmorgan => Self::Jpmorgan,
RoutableConnectors::Klarna => Self::Klarna,
diff --git a/crates/router/src/types/api/connector_mapping.rs b/crates/router/src/types/api/connector_mapping.rs
index 3b92dcf5bd..f86e800f68 100644
--- a/crates/router/src/types/api/connector_mapping.rs
+++ b/crates/router/src/types/api/connector_mapping.rs
@@ -313,6 +313,9 @@ impl ConnectorData {
enums::Connector::Inespay => {
Ok(ConnectorEnum::Old(Box::new(connector::Inespay::new())))
}
+ enums::Connector::Interpayments => Ok(ConnectorEnum::Old(Box::new(
+ connector::Interpayments::new(),
+ ))),
enums::Connector::Itaubank => {
Ok(ConnectorEnum::Old(Box::new(connector::Itaubank::new())))
}
@@ -512,8 +515,7 @@ impl ConnectorData {
| enums::Connector::Gpayments
| enums::Connector::Threedsecureio
| enums::Connector::Cardinal
- | enums::Connector::Taxjar
- | enums::Connector::Interpayments => {
+ | enums::Connector::Taxjar => {
Err(report!(errors::ConnectorError::InvalidConnectorName)
.attach_printable(format!("invalid connector name: {connector_name}")))
.change_context(errors::ApiErrorResponse::InternalServerError)
diff --git a/crates/router/src/types/connector_transformers.rs b/crates/router/src/types/connector_transformers.rs
index ea61e0d17f..9c6cd34b46 100644
--- a/crates/router/src/types/connector_transformers.rs
+++ b/crates/router/src/types/connector_transformers.rs
@@ -91,6 +91,7 @@ impl ForeignTryFrom<api_enums::Connector> for euclid::enums::RoutableConnectors
api_enums::Connector::Iatapay => Self::Iatapay,
api_enums::Connector::Imerchantsolutions => Self::Imerchantsolutions,
api_enums::Connector::Inespay => Self::Inespay,
+ api_enums::Connector::Interpayments => Self::Interpayments,
api_enums::Connector::Itaubank => Self::Itaubank,
api_enums::Connector::Jpmorgan => Self::Jpmorgan,
api_enums::Connector::Juspaythreedsserver => {
@@ -224,11 +225,7 @@ impl ForeignTryFrom<api_enums::Connector> for euclid::enums::RoutableConnectors
message: "Taxjar is not a routable connector".to_string(),
})?
}
- api_enums::Connector::Interpayments => {
- Err(common_utils::errors::ValidationError::InvalidValue {
- message: "Interpayments is not a routable connector".to_string(),
- })?
- }
+
api_enums::Connector::Phonepe => Self::Phonepe,
api_enums::Connector::Paytm => Self::Paytm,
})