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(connector): Add Sanlam connector Template Code and EftDebitOrder bank debit payment method and payment method type (#11827)

Saptak Dutta666c9cd6348d
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index ee12e1dafa..a4b8bd945b 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -11407,6 +11407,17 @@
"$ref": "#/components/schemas/SepaBankDebitAdditionalData"
}
}
+ },
+ {
+ "type": "object",
+ "required": [
+ "eft_debit_order"
+ ],
+ "properties": {
+ "eft_debit_order": {
+ "$ref": "#/components/schemas/EftDebitOrderAdditionalData"
+ }
+ }
}
]
},
@@ -11644,6 +11655,62 @@
}
}
}
+ },
+ {
+ "type": "object",
+ "required": [
+ "eft_debit_order"
+ ],
+ "properties": {
+ "eft_debit_order": {
+ "type": "object",
+ "required": [
+ "account_number"
+ ],
+ "properties": {
+ "billing_details": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankDebitBilling"
+ }
+ ],
+ "nullable": true
+ },
+ "account_number": {
+ "type": "string",
+ "description": "Account number for eft bank debit payment",
+ "example": "000123456789"
+ },
+ "branch_code": {
+ "type": "string",
+ "description": "Branch code for eft bank debit payment",
+ "example": "110000000",
+ "nullable": true
+ },
+ "bank_account_holder_name": {
+ "type": "string",
+ "example": "John Doe",
+ "nullable": true
+ },
+ "bank_name": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankNames"
+ }
+ ],
+ "nullable": true
+ },
+ "bank_type": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankType"
+ }
+ ],
+ "nullable": true
+ }
+ }
+ }
+ }
}
]
},
@@ -11734,6 +11801,7 @@
"type": "string",
"description": "Name of banks supported by Hyperswitch",
"enum": [
+ "absa",
"american_express",
"affin_bank",
"agro_bank",
@@ -15900,6 +15968,7 @@
"recurly",
"redsys",
"revolv3",
+ "sanlam",
"santander",
"shift4",
"silverflow",
@@ -19153,6 +19222,47 @@
"none"
]
},
+ "EftDebitOrderAdditionalData": {
+ "type": "object",
+ "required": [
+ "account_number"
+ ],
+ "properties": {
+ "account_number": {
+ "type": "string",
+ "description": "Partially masked account number for eft bank debit payment",
+ "example": "0001****3456"
+ },
+ "branch_code": {
+ "type": "string",
+ "description": "Partially masked branch code for eft bank debit payment",
+ "example": "110***000",
+ "nullable": true
+ },
+ "bank_account_holder_name": {
+ "type": "string",
+ "description": "Bank account's owner name",
+ "example": "John Doe",
+ "nullable": true
+ },
+ "bank_name": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankNames"
+ }
+ ],
+ "nullable": true
+ },
+ "bank_type": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankType"
+ }
+ ],
+ "nullable": true
+ }
+ }
+ },
"ElementPosition": {
"type": "string",
"enum": [
@@ -29145,6 +29255,7 @@
"duit_now",
"efecty",
"eft",
+ "eft_debit_order",
"eps",
"flexiti",
"fps",
@@ -38842,6 +38953,7 @@
"redsys",
"revolv3",
"riskified",
+ "sanlam",
"santander",
"shift4",
"signifyd",
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index 600ea9410b..7fbd4e0f4e 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -7111,6 +7111,17 @@
"$ref": "#/components/schemas/SepaBankDebitAdditionalData"
}
}
+ },
+ {
+ "type": "object",
+ "required": [
+ "eft_debit_order"
+ ],
+ "properties": {
+ "eft_debit_order": {
+ "$ref": "#/components/schemas/EftDebitOrderAdditionalData"
+ }
+ }
}
]
},
@@ -7348,6 +7359,62 @@
}
}
}
+ },
+ {
+ "type": "object",
+ "required": [
+ "eft_debit_order"
+ ],
+ "properties": {
+ "eft_debit_order": {
+ "type": "object",
+ "required": [
+ "account_number"
+ ],
+ "properties": {
+ "billing_details": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankDebitBilling"
+ }
+ ],
+ "nullable": true
+ },
+ "account_number": {
+ "type": "string",
+ "description": "Account number for eft bank debit payment",
+ "example": "000123456789"
+ },
+ "branch_code": {
+ "type": "string",
+ "description": "Branch code for eft bank debit payment",
+ "example": "110000000",
+ "nullable": true
+ },
+ "bank_account_holder_name": {
+ "type": "string",
+ "example": "John Doe",
+ "nullable": true
+ },
+ "bank_name": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankNames"
+ }
+ ],
+ "nullable": true
+ },
+ "bank_type": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankType"
+ }
+ ],
+ "nullable": true
+ }
+ }
+ }
+ }
}
]
},
@@ -7513,6 +7580,7 @@
"type": "string",
"description": "Name of banks supported by Hyperswitch",
"enum": [
+ "absa",
"american_express",
"affin_bank",
"agro_bank",
@@ -11028,6 +11096,7 @@
"recurly",
"redsys",
"revolv3",
+ "sanlam",
"santander",
"shift4",
"silverflow",
@@ -13470,6 +13539,47 @@
"CardBin"
]
},
+ "EftDebitOrderAdditionalData": {
+ "type": "object",
+ "required": [
+ "account_number"
+ ],
+ "properties": {
+ "account_number": {
+ "type": "string",
+ "description": "Partially masked account number for eft bank debit payment",
+ "example": "0001****3456"
+ },
+ "branch_code": {
+ "type": "string",
+ "description": "Partially masked branch code for eft bank debit payment",
+ "example": "110***000",
+ "nullable": true
+ },
+ "bank_account_holder_name": {
+ "type": "string",
+ "description": "Bank account's owner name",
+ "example": "John Doe",
+ "nullable": true
+ },
+ "bank_name": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankNames"
+ }
+ ],
+ "nullable": true
+ },
+ "bank_type": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BankType"
+ }
+ ],
+ "nullable": true
+ }
+ }
+ },
"ElementPosition": {
"type": "string",
"enum": [
@@ -22617,6 +22727,7 @@
"duit_now",
"efecty",
"eft",
+ "eft_debit_order",
"eps",
"flexiti",
"fps",
@@ -28741,6 +28852,7 @@
"redsys",
"revolv3",
"riskified",
+ "sanlam",
"santander",
"shift4",
"signifyd",
diff --git a/config/config.example.toml b/config/config.example.toml
index 295ad4da40..70656fa9c2 100644
--- a/config/config.example.toml
+++ b/config/config.example.toml
@@ -315,6 +315,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
+sanlam.base_url = "dev"
riskified.base_url = "https://sandbox.riskified.com/api"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
@@ -1333,7 +1334,7 @@ url = "http://localhost:8080" # Open Router URL
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, sanlam" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call
[grpc_client.recovery_decider_client] # Revenue recovery client base url
diff --git a/config/deployments/env_specific.toml b/config/deployments/env_specific.toml
index c4a7c2fece..6a1012d639 100644
--- a/config/deployments/env_specific.toml
+++ b/config/deployments/env_specific.toml
@@ -406,7 +406,7 @@ connector_names = "connector_names" # Comma-separated list of allowed connec
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, sanlam" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call
[revenue_recovery]
diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml
index 7087cd464b..8ed7591c94 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -139,6 +139,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
+sanlam.base_url = "sbx"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
shift4.base_url = "https://api.shift4.com/"
@@ -1014,7 +1015,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, sanlam" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call
# Merchant Advice Code Configuration
diff --git a/config/deployments/production.toml b/config/deployments/production.toml
index 154ec86184..580de3f61e 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -142,6 +142,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis.redsys.es"
revolv3.base_url = "https://api.revolv3.com"
+sanlam.base_url = "live"
riskified.base_url = "https://wh.riskified.com/api/"
santander.base_url = "https://trust-pix.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
@@ -1022,7 +1023,7 @@ click_to_pay = {connector_list = "adyen, cybersource, trustpay"}
connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, sanlam" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call
# Merchant Advice Code Configuration
diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml
index 0d7f23ee90..5d68510df5 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -142,6 +142,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
+sanlam.base_url = "sbx"
riskified.base_url = "https://sandbox.riskified.com/api"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
@@ -1032,7 +1033,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, sanlam" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call
# Merchant Advice Code Configuration
diff --git a/config/development.toml b/config/development.toml
index 423bae26d1..28bda67744 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -345,6 +345,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
+sanlam.base_url = "dev"
riskified.base_url = "https://sandbox.riskified.com/api"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
@@ -1468,7 +1469,7 @@ enabled = "true"
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000"
connection_timeout = 10
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, sanlam" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call
[revenue_recovery]
diff --git a/config/docker_compose.toml b/config/docker_compose.toml
index a0bbf09e35..f38d37337a 100644
--- a/config/docker_compose.toml
+++ b/config/docker_compose.toml
@@ -246,6 +246,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
+sanlam.base_url = "dev"
riskified.base_url = "https://sandbox.riskified.com/api"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index c4ba9934ef..9ebb969ecd 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -3092,6 +3092,34 @@ pub enum BankDebitData {
#[smithy(value_type = "Option<String>")]
bank_account_holder_name: Option<Secret<String>>,
},
+ #[smithy(nested_value_type)]
+ EftDebitOrder {
+ /// Billing details for bank debit
+ #[smithy(value_type = "Option<BankDebitBilling>")]
+ billing_details: Option<BankDebitBilling>,
+
+ /// Account number for eft bank debit payment
+ #[schema(value_type = String, example = "000123456789")]
+ #[smithy(value_type = "String")]
+ account_number: Secret<String>,
+
+ /// Branch code for eft bank debit payment
+ #[schema(value_type = Option<String>, example = "110000000")]
+ #[smithy(value_type = "Option<String>")]
+ branch_code: Option<Secret<String>>,
+
+ #[schema(value_type = Option<String>, example = "John Doe")]
+ #[smithy(value_type = "Option<String>")]
+ bank_account_holder_name: Option<Secret<String>>,
+
+ #[schema(value_type = Option<BankNames>, example = "absa")]
+ #[smithy(value_type = "Option<BankNames>")]
+ bank_name: Option<common_enums::BankNames>,
+
+ #[schema(value_type = Option<BankType>, example = "savings")]
+ #[smithy(value_type = "Option<BankType>")]
+ bank_type: Option<common_enums::BankType>,
+ },
}
impl GetAddressFromPaymentMethodData for BankDebitData {
@@ -3139,6 +3167,11 @@ impl GetAddressFromPaymentMethodData for BankDebitData {
billing_details,
bank_account_holder_name,
..
+ }
+ | Self::EftDebitOrder {
+ billing_details,
+ bank_account_holder_name,
+ ..
} => get_billing_address_inner(
billing_details.as_ref(),
bank_account_holder_name.as_ref(),
@@ -3813,6 +3846,7 @@ impl GetPaymentMethodType for BankDebitData {
Self::SepaBankDebit { .. } => api_enums::PaymentMethodType::Sepa,
Self::BecsBankDebit { .. } => api_enums::PaymentMethodType::Becs,
Self::BacsBankDebit { .. } => api_enums::PaymentMethodType::Bacs,
+ Self::EftDebitOrder { .. } => api_enums::PaymentMethodType::EftDebitOrder,
Self::SepaGuarenteedBankDebit { .. } => {
api_enums::PaymentMethodType::SepaGuarenteedDebit
}
diff --git a/crates/api_models/src/payments/additional_info.rs b/crates/api_models/src/payments/additional_info.rs
index 3549f937da..c37f346541 100644
--- a/crates/api_models/src/payments/additional_info.rs
+++ b/crates/api_models/src/payments/additional_info.rs
@@ -1,5 +1,6 @@
use common_utils::new_type::{
- MaskedBankAccount, MaskedIban, MaskedRoutingNumber, MaskedSortCode, MaskedUpiVpaId,
+ MaskedBankAccount, MaskedBranchCode, MaskedIban, MaskedRoutingNumber, MaskedSortCode,
+ MaskedUpiVpaId,
};
use hyperswitch_masking::Secret;
use smithy::SmithyModel;
@@ -22,6 +23,8 @@ pub enum BankDebitAdditionalData {
#[smithy(value_type = "SepaBankDebitAdditionalData")]
Sepa(Box<SepaBankDebitAdditionalData>),
SepaGuarenteedDebit(Box<SepaBankDebitAdditionalData>),
+ #[smithy(value_type = "EftDebitOrderAdditionalData")]
+ EftDebitOrder(Box<EftDebitOrderAdditionalData>),
}
#[derive(
@@ -118,6 +121,37 @@ pub struct SepaBankDebitAdditionalData {
pub bank_account_holder_name: Option<Secret<String>>,
}
+#[derive(
+ Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema, SmithyModel,
+)]
+#[smithy(namespace = "com.hyperswitch.smithy.types")]
+pub struct EftDebitOrderAdditionalData {
+ /// Partially masked account number for eft bank debit payment
+ #[schema(value_type = String, example = "0001****3456")]
+ #[smithy(value_type = "String")]
+ pub account_number: MaskedBankAccount,
+
+ /// Partially masked branch code for eft bank debit payment
+ #[schema(value_type = Option<String>, example = "110***000")]
+ #[smithy(value_type = "Option<String>")]
+ pub branch_code: Option<MaskedBranchCode>,
+
+ /// Bank account's owner name
+ #[schema(value_type = Option<String>, example = "John Doe")]
+ #[smithy(value_type = "Option<String>")]
+ pub bank_account_holder_name: Option<Secret<String>>,
+
+ /// Name of the bank
+ #[schema(value_type = Option<BankNames>, example = "absa")]
+ #[smithy(value_type = "Option<BankNames>")]
+ pub bank_name: Option<common_enums::BankNames>,
+
+ /// Bank account type
+ #[schema(value_type = Option<BankType>, example = "savings")]
+ #[smithy(value_type = "Option<BankType>")]
+ pub bank_type: Option<common_enums::BankType>,
+}
+
#[derive(
Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema, SmithyModel,
)]
diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rs
index d488ccf902..aee781b4a5 100644
--- a/crates/common_enums/src/connector_enums.rs
+++ b/crates/common_enums/src/connector_enums.rs
@@ -168,6 +168,7 @@ pub enum Connector {
Recurly,
Redsys,
Revolv3,
+ Sanlam,
Santander,
Shift4,
Silverflow,
@@ -391,6 +392,7 @@ impl Connector {
| Self::Recurly
| Self::Redsys
| Self::Revolv3
+ | Self::Sanlam
| Self::Santander
| Self::Shift4
| Self::Silverflow
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index 0511055fbc..0b2c9055b9 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -2357,6 +2357,7 @@ pub enum PaymentMethodType {
DuitNow,
Efecty,
Eft,
+ EftDebitOrder,
Eps,
Flexiti,
Fps,
@@ -2488,6 +2489,7 @@ impl PaymentMethodType {
Self::DuitNow => "DuitNow",
Self::Efecty => "Efecty",
Self::Eft => "EFT",
+ Self::EftDebitOrder => "EFT Debit Order",
Self::Eps => "EPS",
Self::Flexiti => "Flexiti",
Self::Fps => "FPS",
@@ -9645,6 +9647,7 @@ pub enum PermissionScope {
#[serde(rename_all = "snake_case")]
#[smithy(namespace = "com.hyperswitch.smithy.types")]
pub enum BankNames {
+ Absa,
AmericanExpress,
AffinBank,
AgroBank,
diff --git a/crates/common_enums/src/transformers.rs b/crates/common_enums/src/transformers.rs
index b7ad6c9be8..b8ef7d183d 100644
--- a/crates/common_enums/src/transformers.rs
+++ b/crates/common_enums/src/transformers.rs
@@ -1831,6 +1831,7 @@ impl From<PaymentMethodType> for PaymentMethod {
PaymentMethodType::Fps => Self::RealTimePayment,
PaymentMethodType::DuitNow => Self::RealTimePayment,
PaymentMethodType::Eft => Self::BankRedirect,
+ PaymentMethodType::EftDebitOrder => Self::BankDebit,
PaymentMethodType::Eps => Self::BankRedirect,
PaymentMethodType::Evoucher => Self::Reward,
PaymentMethodType::Giropay => Self::BankRedirect,
diff --git a/crates/common_utils/src/new_type.rs b/crates/common_utils/src/new_type.rs
index 6be9260f47..3dc064368e 100644
--- a/crates/common_utils/src/new_type.rs
+++ b/crates/common_utils/src/new_type.rs
@@ -98,6 +98,21 @@ impl From<Secret<String>> for MaskedSortCode {
}
}
+/// Masked branch code
+#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
+pub struct MaskedBranchCode(Secret<String>);
+impl From<String> for MaskedBranchCode {
+ fn from(src: String) -> Self {
+ let masked_value = apply_mask(src.as_ref(), 2, 2);
+ Self(Secret::from(masked_value))
+ }
+}
+impl From<Secret<String>> for MaskedBranchCode {
+ fn from(secret: Secret<String>) -> Self {
+ Self::from(secret.expose())
+ }
+}
+
/// Masked Routing number
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct MaskedRoutingNumber(Secret<String>);
diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs
index 389af6d654..bbe1c3e4c1 100644
--- a/crates/connector_configs/src/connector.rs
+++ b/crates/connector_configs/src/connector.rs
@@ -363,6 +363,7 @@ pub struct ConnectorConfig {
pub rapyd: Option<ConnectorTomlConfig>,
pub redsys: Option<ConnectorTomlConfig>,
pub revolv3: Option<ConnectorTomlConfig>,
+ pub sanlam: Option<ConnectorTomlConfig>,
pub santander: Option<ConnectorTomlConfig>,
pub shift4: Option<ConnectorTomlConfig>,
pub sift: Option<ConnectorTomlConfig>,
@@ -626,6 +627,7 @@ impl ConnectorConfig {
Connector::Tokenex => Ok(connector_data.tokenex),
Connector::Tokenio => Ok(connector_data.tokenio),
Connector::Truelayer => Ok(connector_data.truelayer),
+ Connector::Sanlam => Ok(connector_data.sanlam),
Connector::Trustly => Ok(connector_data.trustly),
Connector::Trustpay => Ok(connector_data.trustpay),
Connector::Trustpayments => Ok(connector_data.trustpayments),
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index 3586ae7301..27e9043238 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -8402,4 +8402,13 @@ payment_method_type = "JCB"
[[imerchantsolutions.debit]]
payment_method_type = "Discover"
[[imerchantsolutions.debit]]
-payment_method_type = "UnionPay"
\ No newline at end of file
+payment_method_type = "UnionPay"
+
+[sanlam]
+[sanlam.connector_auth.BodyKey]
+api_key = "API Key"
+key1 = "Merchant Id"
+[[sanlam.bank_debit]]
+payment_method_type = "eft_debit_order"
+[sanlam.connector_webhook_details]
+merchant_secret="Source verification key"
\ No newline at end of file
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index 65de1a962a..76495fcb3f 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -7459,3 +7459,12 @@ payment_method_type = "JCB"
payment_method_type = "Discover"
[[imerchantsolutions.debit]]
payment_method_type = "UnionPay"
+
+[sanlam]
+[sanlam.connector_auth.BodyKey]
+api_key = "API Key"
+key1 = "Merchant Id"
+[[sanlam.bank_debit]]
+payment_method_type = "eft_debit_order"
+[sanlam.connector_webhook_details]
+merchant_secret="Source verification key"
\ No newline at end of file
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index c52352cc5b..9a4cc29c7b 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -8376,3 +8376,12 @@ payment_method_type = "JCB"
payment_method_type = "Discover"
[[imerchantsolutions.debit]]
payment_method_type = "UnionPay"
+
+[sanlam]
+[sanlam.connector_auth.BodyKey]
+api_key = "API Key"
+key1 = "Merchant Id"
+[[sanlam.bank_debit]]
+payment_method_type = "eft_debit_order"
+[sanlam.connector_webhook_details]
+merchant_secret="Source verification key"
\ No newline at end of file
diff --git a/crates/euclid/src/enums.rs b/crates/euclid/src/enums.rs
index 46273bdc26..8fd2b4fe16 100644
--- a/crates/euclid/src/enums.rs
+++ b/crates/euclid/src/enums.rs
@@ -325,6 +325,7 @@ pub enum RoutableConnectors {
Redsys,
Revolv3,
Riskified,
+ Sanlam,
Santander,
Shift4,
Signifyd,
@@ -406,6 +407,7 @@ impl TryFrom<Connector> for RoutableConnectors {
Connector::Bluesnap => Ok(Self::Bluesnap),
Connector::Blackhawknetwork => Ok(Self::Blackhawknetwork),
Connector::Calida => Ok(Self::Calida),
+ Connector::Sanlam => Ok(Self::Sanlam),
Connector::Boku => Ok(Self::Boku),
Connector::Braintree => Ok(Self::Braintree),
Connector::Breadpay => Ok(Self::Breadpay),
@@ -602,6 +604,7 @@ impl From<RoutableConnectors> for Connector {
RoutableConnectors::Globepay => Self::Globepay,
RoutableConnectors::Gocardless => Self::Gocardless,
RoutableConnectors::Helcim => Self::Helcim,
+ RoutableConnectors::Sanlam => Self::Sanlam,
RoutableConnectors::Hyperpg => Self::Hyperpg,
RoutableConnectors::Iatapay => Self::Iatapay,
RoutableConnectors::Imerchantsolutions => Self::Imerchantsolutions,
diff --git a/crates/euclid/src/frontend/dir/enums.rs b/crates/euclid/src/frontend/dir/enums.rs
index 8b80a15b49..df53d93ad7 100644
--- a/crates/euclid/src/frontend/dir/enums.rs
+++ b/crates/euclid/src/frontend/dir/enums.rs
@@ -394,6 +394,7 @@ pub enum UpiType {
#[strum(serialize_all = "snake_case")]
pub enum BankDebitType {
Ach,
+ EftDebitOrder,
Sepa,
SepaGuarenteedDebit,
Bacs,
diff --git a/crates/euclid/src/frontend/dir/lowering.rs b/crates/euclid/src/frontend/dir/lowering.rs
index 39e6bf0172..7f50bbcd66 100644
--- a/crates/euclid/src/frontend/dir/lowering.rs
+++ b/crates/euclid/src/frontend/dir/lowering.rs
@@ -77,6 +77,7 @@ impl From<enums::BankDebitType> for global_enums::PaymentMethodType {
fn from(value: enums::BankDebitType) -> Self {
match value {
enums::BankDebitType::Ach => Self::Ach,
+ enums::BankDebitType::EftDebitOrder => Self::EftDebitOrder,
enums::BankDebitType::Sepa => Self::Sepa,
enums::BankDebitType::SepaGuarenteedDebit => Self::SepaGuarenteedDebit,
enums::BankDebitType::Bacs => Self::Bacs,
diff --git a/crates/euclid/src/frontend/dir/transformers.rs b/crates/euclid/src/frontend/dir/transformers.rs
index 288ce21a7a..3d781d53cb 100644
--- a/crates/euclid/src/frontend/dir/transformers.rs
+++ b/crates/euclid/src/frontend/dir/transformers.rs
@@ -215,6 +215,9 @@ impl IntoDirValue for (global_enums::PaymentMethodType, global_enums::PaymentMet
Ok(dirval!(MobilePaymentType = DirectCarrierBilling))
}
global_enums::PaymentMethodType::Eft => Ok(dirval!(BankRedirectType = Eft)),
+ global_enums::PaymentMethodType::EftDebitOrder => {
+ Ok(dirval!(BankDebitType = EftDebitOrder))
+ }
global_enums::PaymentMethodType::IndonesianBankTransfer => {
Ok(dirval!(BankTransferType = IndonesianBankTransfer))
}
diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs
index 3d99139db3..1fee27c3d1 100644
--- a/crates/hyperswitch_connectors/src/connectors.rs
+++ b/crates/hyperswitch_connectors/src/connectors.rs
@@ -109,6 +109,7 @@ pub mod recurly;
pub mod redsys;
pub mod revolv3;
pub mod riskified;
+pub mod sanlam;
pub mod santander;
pub mod shift4;
pub mod sift;
@@ -173,12 +174,13 @@ pub use self::{
payone::Payone, paypal::Paypal, paysafe::Paysafe, paystack::Paystack, paytm::Paytm, payu::Payu,
peachpayments::Peachpayments, phonepe::Phonepe, placetopay::Placetopay, plaid::Plaid,
powertranz::Powertranz, prophetpay::Prophetpay, rapyd::Rapyd, razorpay::Razorpay,
- recurly::Recurly, redsys::Redsys, revolv3::Revolv3, riskified::Riskified, santander::Santander,
- shift4::Shift4, sift::Sift, signifyd::Signifyd, silverflow::Silverflow, square::Square,
- stax::Stax, stripe::Stripe, stripebilling::Stripebilling, taxjar::Taxjar, tesouro::Tesouro,
- threedsecureio::Threedsecureio, thunes::Thunes, tokenex::Tokenex, tokenio::Tokenio,
- truelayer::Truelayer, trustly::Trustly, trustpay::Trustpay, trustpayments::Trustpayments,
- tsys::Tsys, unified_authentication_service::UnifiedAuthenticationService, vgs::Vgs, volt::Volt,
+ recurly::Recurly, redsys::Redsys, revolv3::Revolv3, riskified::Riskified, sanlam::Sanlam,
+ santander::Santander, shift4::Shift4, sift::Sift, signifyd::Signifyd, silverflow::Silverflow,
+ square::Square, stax::Stax, stripe::Stripe, stripebilling::Stripebilling, taxjar::Taxjar,
+ tesouro::Tesouro, threedsecureio::Threedsecureio, thunes::Thunes, tokenex::Tokenex,
+ tokenio::Tokenio, truelayer::Truelayer, trustly::Trustly, trustpay::Trustpay,
+ trustpayments::Trustpayments, tsys::Tsys,
+ unified_authentication_service::UnifiedAuthenticationService, vgs::Vgs, volt::Volt,
wellsfargo::Wellsfargo, wellsfargopayout::Wellsfargopayout, wise::Wise, worldline::Worldline,
worldpay::Worldpay, worldpaymodular::Worldpaymodular, worldpayvantiv::Worldpayvantiv,
worldpayxml::Worldpayxml, xendit::Xendit, zen::Zen, zift::Zift, zsl::Zsl,
diff --git a/crates/hyperswitch_connectors/src/connectors/adyen.rs b/crates/hyperswitch_connectors/src/connectors/adyen.rs
index 7a5498ef8e..68fade296b 100644
--- a/crates/hyperswitch_connectors/src/connectors/adyen.rs
+++ b/crates/hyperswitch_connectors/src/connectors/adyen.rs
@@ -329,6 +329,7 @@ impl ConnectorValidation for Adyen {
| PaymentMethodType::Przelewy24
| PaymentMethodType::Becs
| PaymentMethodType::Eft
+ | PaymentMethodType::EftDebitOrder
| PaymentMethodType::ClassicReward
| PaymentMethodType::Pse
| PaymentMethodType::LocalBankTransfer
diff --git a/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs b/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs
index 12ba803e48..979ff4152d 100644
--- a/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs
@@ -1356,6 +1356,7 @@ impl TryFrom<&common_enums::BankNames> for OpenBankingUKIssuer {
| common_enums::BankNames::TheSiamCommercialBank
| common_enums::BankNames::Yoursafe
| common_enums::BankNames::N26
+ | common_enums::BankNames::Absa
| common_enums::BankNames::NationaleNederlanden
| common_enums::BankNames::KasikornBank => {
Err(errors::ConnectorError::NotImplemented(
@@ -2359,12 +2360,12 @@ impl TryFrom<(&BankDebitData, &PaymentsAuthorizeRouterData)> for AdyenPaymentMet
)))
}
- BankDebitData::BecsBankDebit { .. } | BankDebitData::SepaGuarenteedBankDebit { .. } => {
- Err(errors::ConnectorError::NotImplemented(
- utils::get_unimplemented_payment_method_error_message("Adyen"),
- )
- .into())
- }
+ BankDebitData::BecsBankDebit { .. }
+ | BankDebitData::SepaGuarenteedBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. } => Err(errors::ConnectorError::NotImplemented(
+ utils::get_unimplemented_payment_method_error_message("Adyen"),
+ )
+ .into()),
}
}
}
diff --git a/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs b/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs
index 15be1b12ee..5b9e836894 100644
--- a/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs
@@ -322,12 +322,12 @@ impl TryFrom<(&BankDebitData, &types::TokenizationRouterData)> for CustomerBankA
};
Ok(Self::InternationalBankAccount(international_bank_account))
}
- BankDebitData::BacsBankDebit { .. } | BankDebitData::SepaGuarenteedBankDebit { .. } => {
- Err(errors::ConnectorError::NotImplemented(
- utils::get_unimplemented_payment_method_error_message("Gocardless"),
- )
- .into())
- }
+ BankDebitData::BacsBankDebit { .. }
+ | BankDebitData::SepaGuarenteedBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. } => Err(errors::ConnectorError::NotImplemented(
+ utils::get_unimplemented_payment_method_error_message("Gocardless"),
+ )
+ .into()),
}
}
}
@@ -486,6 +486,7 @@ fn get_ip_if_required(
BankDebitData::SepaBankDebit { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. }
| BankDebitData::BecsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::BacsBankDebit { .. } => Ok(None),
}
}
@@ -497,12 +498,12 @@ impl TryFrom<&BankDebitData> for GocardlessScheme {
BankDebitData::AchBankDebit { .. } => Ok(Self::Ach),
BankDebitData::SepaBankDebit { .. } => Ok(Self::SepaCore),
BankDebitData::BecsBankDebit { .. } => Ok(Self::Becs),
- BankDebitData::BacsBankDebit { .. } | BankDebitData::SepaGuarenteedBankDebit { .. } => {
- Err(errors::ConnectorError::NotImplemented(
- "Setup Mandate flow for selected payment method through Gocardless".to_string(),
- )
- .into())
- }
+ BankDebitData::BacsBankDebit { .. }
+ | BankDebitData::SepaGuarenteedBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. } => Err(errors::ConnectorError::NotImplemented(
+ "Setup Mandate flow for selected payment method through Gocardless".to_string(),
+ )
+ .into()),
}
}
}
diff --git a/crates/hyperswitch_connectors/src/connectors/klarna.rs b/crates/hyperswitch_connectors/src/connectors/klarna.rs
index 5b95f9ea7f..dca9367288 100644
--- a/crates/hyperswitch_connectors/src/connectors/klarna.rs
+++ b/crates/hyperswitch_connectors/src/connectors/klarna.rs
@@ -586,6 +586,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
| common_enums::PaymentMethodType::DirectCarrierBilling
| common_enums::PaymentMethodType::Efecty
| common_enums::PaymentMethodType::Eft
+ | common_enums::PaymentMethodType::EftDebitOrder
| common_enums::PaymentMethodType::Eps
| common_enums::PaymentMethodType::Evoucher
| common_enums::PaymentMethodType::Giropay
@@ -718,6 +719,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
| common_enums::PaymentMethodType::DirectCarrierBilling
| common_enums::PaymentMethodType::Efecty
| common_enums::PaymentMethodType::Eft
+ | common_enums::PaymentMethodType::EftDebitOrder
| common_enums::PaymentMethodType::Eps
| common_enums::PaymentMethodType::Evoucher
| common_enums::PaymentMethodType::Giropay
@@ -838,6 +840,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
| common_enums::PaymentMethodType::Bacs
| common_enums::PaymentMethodType::BancontactCard
| common_enums::PaymentMethodType::Becs
+ | common_enums::PaymentMethodType::EftDebitOrder
| common_enums::PaymentMethodType::Benefit
| common_enums::PaymentMethodType::Bizum
| common_enums::PaymentMethodType::Blik
@@ -990,6 +993,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
| common_enums::PaymentMethodType::DirectCarrierBilling
| common_enums::PaymentMethodType::Efecty
| common_enums::PaymentMethodType::Eft
+ | common_enums::PaymentMethodType::EftDebitOrder
| common_enums::PaymentMethodType::Eps
| common_enums::PaymentMethodType::Evoucher
| common_enums::PaymentMethodType::Giropay
diff --git a/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs b/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs
index 6b6e73ebc8..96c2fb8368 100644
--- a/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs
@@ -408,6 +408,7 @@ impl TryFrom<&BankNames> for MultisafepayBankNames {
| BankNames::RoyalBankOfScotland
| BankNames::Starling
| BankNames::TsbBank
+ | BankNames::Absa
| BankNames::TescoBank
| BankNames::UlsterBank => Err(Into::into(errors::ConnectorError::NotSupported {
message: String::from("BankRedirect"),
diff --git a/crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs b/crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs
index 49238b73fb..1a4c59f3ea 100644
--- a/crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs
@@ -332,6 +332,7 @@ impl TryFrom<&NordeaRouterData<&CreateOrderRouterData>> for NordeaPaymentsReques
BankDebitData::AchBankDebit { .. }
| BankDebitData::BacsBankDebit { .. }
| BankDebitData::BecsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. } => {
Err(errors::ConnectorError::NotImplemented(
get_unimplemented_payment_method_error_message("Nordea"),
@@ -418,6 +419,7 @@ impl TryFrom<&NordeaRouterData<&PaymentsPreProcessingRouterData>> for NordeaPaym
BankDebitData::AchBankDebit { .. }
| BankDebitData::BacsBankDebit { .. }
| BankDebitData::BecsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. } => {
Err(errors::ConnectorError::NotImplemented(
get_unimplemented_payment_method_error_message("Nordea"),
diff --git a/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs b/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
index 974cc7867a..d717d9db23 100644
--- a/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
@@ -1249,6 +1249,7 @@ impl TryFrom<&PaypalRouterData<&PaymentsAuthorizeRouterData>> for PaypalPayments
| enums::PaymentMethodType::DuitNow
| enums::PaymentMethodType::Efecty
| enums::PaymentMethodType::Eft
+ | enums::PaymentMethodType::EftDebitOrder
| enums::PaymentMethodType::Eps
| enums::PaymentMethodType::Bluecode
| enums::PaymentMethodType::Fps
@@ -1409,6 +1410,7 @@ impl TryFrom<&BankDebitData> for PaypalPaymentsRequest {
| BankDebitData::SepaBankDebit { .. }
| BankDebitData::BecsBankDebit { .. }
| BankDebitData::BacsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. } => {
Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("Paypal"),
diff --git a/crates/hyperswitch_connectors/src/connectors/sanlam.rs b/crates/hyperswitch_connectors/src/connectors/sanlam.rs
new file mode 100644
index 0000000000..04eed9327a
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/sanlam.rs
@@ -0,0 +1,449 @@
+pub mod transformers;
+
+use std::sync::LazyLock;
+
+use common_enums::enums;
+use common_utils::{crypto, errors::CustomResult, ext_traits::ByteSliceExt, request::Request};
+use error_stack::ResultExt;
+use hyperswitch_domain_models::{
+ payment_method_data::PaymentMethodData,
+ router_data::{AccessToken, ConnectorAuthType, RouterData},
+ router_flow_types::{
+ access_token_auth::AccessTokenAuth,
+ payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
+ refunds::{Execute, RSync},
+ },
+ router_request_types::{
+ AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
+ PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,
+ RefundsData, SetupMandateRequestData,
+ },
+ router_response_types::{
+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,
+ SupportedPaymentMethods, SupportedPaymentMethodsExt,
+ },
+ types::{
+ PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+ PaymentsSessionRouterData, PaymentsSyncRouterData, RefreshTokenRouterData,
+ RefundExecuteRouterData, RefundSyncRouterData, SetupMandateRouterData,
+ TokenizationRouterData,
+ },
+};
+use hyperswitch_interfaces::{
+ api::{
+ self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
+ ConnectorValidation,
+ },
+ configs::Connectors,
+ errors,
+ events::connector_api_logs::ConnectorEvent,
+ types::Response,
+ webhooks,
+};
+use hyperswitch_masking::{Mask, PeekInterface};
+use transformers as sanlam;
+
+use crate::{constants::headers, types::ResponseRouterData, utils::get_header_key_value};
+
+#[derive(Clone)]
+pub struct Sanlam {}
+
+impl Sanlam {
+ pub fn new() -> &'static Self {
+ &Self {}
+ }
+}
+
+impl api::Payment for Sanlam {}
+impl api::PaymentSession for Sanlam {}
+impl api::ConnectorAccessToken for Sanlam {}
+impl api::MandateSetup for Sanlam {}
+impl api::PaymentAuthorize for Sanlam {}
+impl api::PaymentSync for Sanlam {}
+impl api::PaymentCapture for Sanlam {}
+impl api::PaymentVoid for Sanlam {}
+impl api::Refund for Sanlam {}
+impl api::RefundExecute for Sanlam {}
+impl api::RefundSync for Sanlam {}
+impl api::PaymentToken for Sanlam {}
+
+impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for Sanlam
+where
+ Self: ConnectorIntegration<Flow, Request, Response>,
+{
+ fn build_headers(
+ &self,
+ req: &RouterData<Flow, Request, Response>,
+ _connectors: &Connectors,
+ ) -> CustomResult<Vec<(String, hyperswitch_masking::Maskable<String>)>, errors::ConnectorError>
+ {
+ let mut header = vec![(
+ headers::CONTENT_TYPE.to_string(),
+ self.get_content_type().to_string().into(),
+ )];
+ let mut api_key = self.get_auth_header(&req.connector_auth_type)?;
+ header.append(&mut api_key);
+ Ok(header)
+ }
+}
+
+impl ConnectorCommon for Sanlam {
+ fn id(&self) -> &'static str {
+ "sanlam"
+ }
+
+ fn get_currency_unit(&self) -> api::CurrencyUnit {
+ api::CurrencyUnit::Minor
+ }
+
+ fn common_get_content_type(&self) -> &'static str {
+ "application/json"
+ }
+
+ fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
+ connectors.sanlam.base_url.as_ref()
+ }
+
+ fn get_auth_header(
+ &self,
+ auth_type: &ConnectorAuthType,
+ ) -> CustomResult<Vec<(String, hyperswitch_masking::Maskable<String>)>, errors::ConnectorError>
+ {
+ let auth = sanlam::SanlamAuthType::try_from(auth_type)
+ .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+ Ok(vec![
+ (
+ headers::AUTHORIZATION.to_string(),
+ auth.api_key.peek().to_owned().into_masked(),
+ ),
+ (
+ headers::MERCHANT_ID.to_string(),
+ auth.merchant_id.peek().to_owned().into(),
+ ),
+ ])
+ }
+}
+
+impl ConnectorValidation for Sanlam {
+ fn validate_mandate_payment(
+ &self,
+ _pm_type: Option<enums::PaymentMethodType>,
+ pm_data: PaymentMethodData,
+ ) -> CustomResult<(), errors::ConnectorError> {
+ match pm_data {
+ PaymentMethodData::Card(_) => Err(errors::ConnectorError::NotImplemented(
+ "validate_mandate_payment does not support cards".to_string(),
+ )
+ .into()),
+ _ => Ok(()),
+ }
+ }
+
+ fn validate_psync_reference_id(
+ &self,
+ _data: &PaymentsSyncData,
+ _is_three_ds: bool,
+ _status: enums::AttemptStatus,
+ _connector_meta_data: Option<common_utils::pii::SecretSerdeValue>,
+ ) -> CustomResult<(), errors::ConnectorError> {
+ Ok(())
+ }
+}
+
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &PaymentsSessionRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "Session".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+ for Sanlam
+{
+ fn build_request(
+ &self,
+ _req: &TokenizationRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "PaymentMethodToken".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &RefreshTokenRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "AccessTokenAuth".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &SetupMandateRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "SetupMandate".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &PaymentsAuthorizeRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "Authorize".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &PaymentsSyncRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "PSync".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+
+ fn handle_response(
+ &self,
+ data: &PaymentsSyncRouterData,
+ event_builder: Option<&mut ConnectorEvent>,
+ res: Response,
+ ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
+ let response: sanlam::SanlamWebhookEvent = res
+ .response
+ .parse_struct("SanlamWebhookEvent")
+ .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+ event_builder.map(|i| i.set_response_body(&response));
+ router_env::logger::info!(connector_response=?response);
+ RouterData::try_from(ResponseRouterData {
+ response,
+ data: data.clone(),
+ http_code: res.status_code,
+ })
+ }
+}
+
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &PaymentsCaptureRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "Capture".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &PaymentsCancelRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "Void".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &RefundExecuteRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "Execute".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Sanlam {
+ fn build_request(
+ &self,
+ _req: &RefundSyncRouterData,
+ _connectors: &Connectors,
+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+ Err(errors::ConnectorError::FlowNotSupported {
+ flow: "RSync".to_string(),
+ connector: "Sanlam".to_string(),
+ }
+ .into())
+ }
+}
+
+#[async_trait::async_trait]
+impl webhooks::IncomingWebhook for Sanlam {
+ fn get_webhook_source_verification_algorithm(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<Box<dyn crypto::VerifySignature + Send>, errors::ConnectorError> {
+ Ok(Box::new(crypto::HmacSha256))
+ }
+
+ fn get_webhook_source_verification_signature(
+ &self,
+ request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ _connector_webhook_secrets: &api_models::webhooks::ConnectorWebhookSecrets,
+ ) -> CustomResult<Vec<u8>, errors::ConnectorError> {
+ let signature = get_header_key_value("X-Signature", request.headers)?;
+ hex::decode(signature)
+ .change_context(errors::ConnectorError::WebhookSourceVerificationFailed)
+ }
+
+ fn get_webhook_source_verification_message(
+ &self,
+ request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ _merchant_id: &common_utils::id_type::MerchantId,
+ _connector_webhook_secrets: &api_models::webhooks::ConnectorWebhookSecrets,
+ ) -> CustomResult<Vec<u8>, errors::ConnectorError> {
+ let message = std::str::from_utf8(request.body)
+ .change_context(errors::ConnectorError::WebhookSourceVerificationFailed)?;
+ Ok(message.to_string().into_bytes())
+ }
+
+ fn get_webhook_object_reference_id(
+ &self,
+ request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
+ let details: sanlam::SanlamWebhookEvent =
+ request
+ .body
+ .parse_struct("SanlamWebhookEvent")
+ .change_context(errors::ConnectorError::WebhookReferenceIdNotFound)?;
+
+ let id = match details {
+ sanlam::SanlamWebhookEvent::Payment(ref event) => {
+ api_models::webhooks::ObjectReferenceId::PaymentId(
+ api_models::payments::PaymentIdType::PaymentAttemptId(
+ event.payment.user_reference.clone(),
+ ),
+ )
+ }
+ };
+
+ Ok(id)
+ }
+
+ fn get_webhook_event_type(
+ &self,
+ request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ _context: Option<&webhooks::WebhookContext>,
+ ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
+ let details: sanlam::SanlamWebhookEvent =
+ request
+ .body
+ .parse_struct("SanlamWebhookEvent")
+ .change_context(errors::ConnectorError::WebhookReferenceIdNotFound)?;
+
+ let event_type = match details {
+ sanlam::SanlamWebhookEvent::Payment(ref event) => match event.event_type {
+ sanlam::SanlamWebhookEventType::PaymentSucceeded => {
+ api_models::webhooks::IncomingWebhookEvent::PaymentIntentSuccess
+ }
+ sanlam::SanlamWebhookEventType::PaymentFailed => {
+ api_models::webhooks::IncomingWebhookEvent::PaymentIntentFailure
+ }
+ sanlam::SanlamWebhookEventType::DisputeOpened => {
+ api_models::webhooks::IncomingWebhookEvent::DisputeOpened
+ }
+ },
+ };
+
+ Ok(event_type)
+ }
+
+ fn get_webhook_resource_object(
+ &self,
+ request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<Box<dyn hyperswitch_masking::ErasedMaskSerialize>, errors::ConnectorError>
+ {
+ let details: sanlam::SanlamWebhookEvent =
+ request
+ .body
+ .parse_struct("SanlamWebhookEvent")
+ .change_context(errors::ConnectorError::WebhookResourceObjectNotFound)?;
+
+ Ok(Box::new(details))
+ }
+}
+
+static SANLAM_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = LazyLock::new(|| {
+ let supported_capture_methods = vec![enums::CaptureMethod::Automatic];
+
+ let mut sanlam_supported_payment_methods = SupportedPaymentMethods::new();
+ sanlam_supported_payment_methods.add(
+ enums::PaymentMethod::BankDebit,
+ enums::PaymentMethodType::EftDebitOrder,
+ PaymentMethodDetails {
+ mandates: common_enums::FeatureStatus::NotSupported,
+ refunds: common_enums::FeatureStatus::NotSupported,
+ supported_capture_methods: supported_capture_methods.clone(),
+ specific_features: None,
+ },
+ );
+
+ sanlam_supported_payment_methods
+});
+
+static SANLAM_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
+ display_name: "Sanlam",
+ description: "Sanlam connector",
+ connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,
+ integration_status: enums::ConnectorIntegrationStatus::Live,
+};
+
+static SANLAM_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 0] = [];
+
+impl ConnectorSpecifications for Sanlam {
+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
+ Some(&SANLAM_CONNECTOR_INFO)
+ }
+
+ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
+ Some(&*SANLAM_SUPPORTED_PAYMENT_METHODS)
+ }
+
+ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {
+ Some(&SANLAM_SUPPORTED_WEBHOOK_FLOWS)
+ }
+}
diff --git a/crates/hyperswitch_connectors/src/connectors/sanlam/transformers.rs b/crates/hyperswitch_connectors/src/connectors/sanlam/transformers.rs
new file mode 100644
index 0000000000..3f1253755e
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/sanlam/transformers.rs
@@ -0,0 +1,144 @@
+use hyperswitch_domain_models::{
+ router_data::{ConnectorAuthType, ErrorResponse, RouterData},
+ router_request_types::ResponseId,
+ router_response_types::PaymentsResponseData,
+};
+use hyperswitch_interfaces::{
+ consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},
+ errors,
+};
+use hyperswitch_masking::Secret;
+use serde::{Deserialize, Serialize};
+
+use crate::{types::ResponseRouterData, utils};
+
+pub struct SanlamAuthType {
+ pub(super) api_key: Secret<String>,
+ pub(super) merchant_id: Secret<String>,
+}
+
+impl TryFrom<&ConnectorAuthType> for SanlamAuthType {
+ type Error = error_stack::Report<errors::ConnectorError>;
+ fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+ match auth_type {
+ ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self {
+ api_key: api_key.to_owned(),
+ merchant_id: key1.to_owned(),
+ }),
+ _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
+ }
+ }
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum SanlamWebhookEvent {
+ Payment(SanlamPaymentWebhookEvent),
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+pub struct SanlamPaymentWebhookEvent {
+ pub event_type: SanlamWebhookEventType,
+ pub payment: SanlamWebhookPayment,
+ pub error: Option<SanlamWebhookError>,
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+pub struct SanlamWebhookError {
+ pub code: Option<String>,
+ pub message: Option<String>,
+ pub reason: Option<String>,
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+pub enum SanlamWebhookEventType {
+ #[serde(rename = "payment.succeeded")]
+ PaymentSucceeded,
+ #[serde(rename = "payment.failed")]
+ PaymentFailed,
+ #[serde(rename = "dispute.opened")]
+ DisputeOpened,
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+pub struct SanlamWebhookPayment {
+ pub user_reference: String,
+ pub status: SanlamPaymentStatus,
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+#[serde(rename_all = "snake_case")]
+pub enum SanlamPaymentStatus {
+ Success,
+ Failure,
+ Dispute,
+}
+
+impl<F, T> TryFrom<ResponseRouterData<F, SanlamWebhookEvent, T, PaymentsResponseData>>
+ for RouterData<F, T, PaymentsResponseData>
+{
+ type Error = error_stack::Report<errors::ConnectorError>;
+ fn try_from(
+ item: ResponseRouterData<F, SanlamWebhookEvent, T, PaymentsResponseData>,
+ ) -> Result<Self, Self::Error> {
+ match item.response {
+ SanlamWebhookEvent::Payment(payment_event) => {
+ let status = common_enums::AttemptStatus::try_from(&payment_event.payment.status)?;
+ let response = if utils::is_payment_failure(status) {
+ Err(ErrorResponse {
+ code: payment_event
+ .error
+ .as_ref()
+ .and_then(|e| e.code.clone())
+ .unwrap_or(NO_ERROR_CODE.to_string()),
+ message: payment_event
+ .error
+ .as_ref()
+ .and_then(|e| e.message.clone())
+ .unwrap_or(NO_ERROR_MESSAGE.to_string()),
+ reason: payment_event.error.as_ref().and_then(|e| e.reason.clone()),
+ attempt_status: None,
+ connector_transaction_id: None,
+ connector_response_reference_id: None,
+ status_code: item.http_code,
+ network_advice_code: None,
+ network_decline_code: None,
+ network_error_message: None,
+ connector_metadata: None,
+ })
+ } else {
+ Ok(PaymentsResponseData::TransactionResponse {
+ resource_id: ResponseId::NoResponseId,
+ redirection_data: Box::new(None),
+ mandate_reference: Box::new(None),
+ connector_metadata: None,
+ network_txn_id: None,
+ connector_response_reference_id: None,
+ incremental_authorization_allowed: None,
+ authentication_data: None,
+ charges: None,
+ })
+ };
+
+ Ok(Self {
+ status,
+ response,
+ ..item.data
+ })
+ }
+ }
+ }
+}
+
+impl TryFrom<&SanlamPaymentStatus> for common_enums::AttemptStatus {
+ type Error = error_stack::Report<errors::ConnectorError>;
+ fn try_from(item: &SanlamPaymentStatus) -> Result<Self, Self::Error> {
+ match item {
+ SanlamPaymentStatus::Success => Ok(Self::Charged),
+ SanlamPaymentStatus::Failure => Ok(Self::Failure),
+ SanlamPaymentStatus::Dispute => {
+ Err(errors::ConnectorError::ResponseDeserializationFailed)?
+ }
+ }
+ }
+}
diff --git a/crates/hyperswitch_connectors/src/connectors/square/transformers.rs b/crates/hyperswitch_connectors/src/connectors/square/transformers.rs
index 163a0cbd9e..6cb9dee69a 100644
--- a/crates/hyperswitch_connectors/src/connectors/square/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/square/transformers.rs
@@ -30,6 +30,7 @@ impl TryFrom<(&types::TokenizationRouterData, BankDebitData)> for SquareTokenReq
| BankDebitData::SepaBankDebit { .. }
| BankDebitData::BecsBankDebit { .. }
| BankDebitData::BacsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. } => {
Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("Square"),
diff --git a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
index af00f2414a..290c9cacf8 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
@@ -909,6 +909,7 @@ impl TryFrom<enums::PaymentMethodType> for StripePaymentMethodType {
| enums::PaymentMethodType::DirectCarrierBilling
| enums::PaymentMethodType::Efecty
| enums::PaymentMethodType::Eft
+ | enums::PaymentMethodType::EftDebitOrder
| enums::PaymentMethodType::Evoucher
| enums::PaymentMethodType::GoPay
| enums::PaymentMethodType::Gcash
@@ -1319,7 +1320,8 @@ impl TryFrom<&payment_method_data::BankDebitData> for StripePaymentMethodType {
payment_method_data::BankDebitData::SepaBankDebit { .. } => Ok(Self::Sepa),
payment_method_data::BankDebitData::BecsBankDebit { .. } => Ok(Self::Becs),
payment_method_data::BankDebitData::BacsBankDebit { .. } => Ok(Self::Bacs),
- payment_method_data::BankDebitData::SepaGuarenteedBankDebit { .. } => {
+ payment_method_data::BankDebitData::SepaGuarenteedBankDebit { .. }
+ | payment_method_data::BankDebitData::EftDebitOrder { .. } => {
Err(ConnectorError::NotImplemented(
get_unimplemented_payment_method_error_message("stripe"),
))
diff --git a/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs b/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
index b7d412dd41..4e8d5980aa 100644
--- a/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
@@ -1182,6 +1182,7 @@ impl
))),
BankDebitData::SepaBankDebit { .. }
| BankDebitData::BacsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::BecsBankDebit { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. } => {
Err(errors::ConnectorError::NotImplemented(
diff --git a/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs b/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs
index 9785e20ebc..a6c4029b8d 100644
--- a/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/zen/transformers.rs
@@ -792,6 +792,7 @@ impl TryFrom<&BankDebitData> for ZenPaymentsRequest {
| BankDebitData::SepaBankDebit { .. }
| BankDebitData::BecsBankDebit { .. }
| BankDebitData::BacsBankDebit { .. }
+ | BankDebitData::EftDebitOrder { .. }
| BankDebitData::SepaGuarenteedBankDebit { .. } => {
Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("Zen"),
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index e21b5527ba..cdb961d253 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -289,6 +289,7 @@ default_imp_for_authorize_session_token!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Shift4,
connectors::Sift,
@@ -448,6 +449,7 @@ default_imp_for_payment_settlement_split_create!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -608,6 +610,7 @@ default_imp_for_calculate_tax!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -726,6 +729,7 @@ default_imp_for_session_update!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -886,6 +890,7 @@ default_imp_for_post_session_tokens!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1042,6 +1047,7 @@ default_imp_for_create_order!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1202,6 +1208,7 @@ default_imp_for_update_metadata!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Shift4,
connectors::Sift,
connectors::Silverflow,
@@ -1371,6 +1378,7 @@ default_imp_for_cancel_post_capture!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -1466,6 +1474,7 @@ macro_rules! default_imp_for_complete_authorize {
default_imp_for_complete_authorize!(
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Worldpaymodular,
connectors::Silverflow,
connectors::Vgs,
@@ -1706,6 +1715,7 @@ default_imp_for_incremental_authorization!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1821,6 +1831,7 @@ default_imp_for_extend_authorization!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -2014,6 +2025,7 @@ default_imp_for_create_customer!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2160,6 +2172,7 @@ default_imp_for_connector_redirect_response!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2207,6 +2220,7 @@ macro_rules! default_imp_for_pre_authenticate_steps{
default_imp_for_pre_authenticate_steps!(
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Aci,
connectors::Adyen,
connectors::Adyenplatform,
@@ -2361,6 +2375,7 @@ macro_rules! default_imp_for_authenticate_steps{
default_imp_for_authenticate_steps!(
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Aci,
connectors::Adyen,
connectors::Adyenplatform,
@@ -2623,6 +2638,7 @@ default_imp_for_post_authenticate_steps!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2678,6 +2694,7 @@ macro_rules! default_imp_for_pre_processing_steps{
default_imp_for_pre_processing_steps!(
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Zift,
connectors::Trustpayments,
connectors::Silverflow,
@@ -2930,6 +2947,7 @@ default_imp_for_post_processing_steps!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3092,6 +3110,7 @@ default_imp_for_approve!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3254,6 +3273,7 @@ default_imp_for_reject!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3416,6 +3436,7 @@ default_imp_for_webhook_source_verification!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3575,6 +3596,7 @@ default_imp_for_accept_dispute!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3734,6 +3756,7 @@ default_imp_for_submit_evidence!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3892,6 +3915,7 @@ default_imp_for_defend_dispute!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4054,6 +4078,7 @@ default_imp_for_fetch_disputes!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4215,6 +4240,7 @@ default_imp_for_dispute_sync!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4383,6 +4409,7 @@ default_imp_for_file_upload!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4526,6 +4553,7 @@ default_imp_for_payouts!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4676,6 +4704,7 @@ default_imp_for_payouts_create!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4834,6 +4863,7 @@ default_imp_for_payouts_retrieve!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4992,6 +5022,7 @@ default_imp_for_payouts_eligibility!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5145,6 +5176,7 @@ default_imp_for_payouts_fulfill!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5300,6 +5332,7 @@ default_imp_for_payouts_cancel!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5458,6 +5491,7 @@ default_imp_for_payouts_quote!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5619,6 +5653,7 @@ default_imp_for_payouts_recipient!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5779,6 +5814,7 @@ default_imp_for_payouts_recipient_account!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5942,6 +5978,7 @@ default_imp_for_frm_sale!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6103,6 +6140,7 @@ default_imp_for_frm_checkout!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6264,6 +6302,7 @@ default_imp_for_frm_transaction!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6426,6 +6465,7 @@ default_imp_for_frm_fulfillment!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6588,6 +6628,7 @@ default_imp_for_frm_record_return!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6744,6 +6785,7 @@ default_imp_for_revoking_mandates!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -6904,6 +6946,7 @@ default_imp_for_uas_pre_authentication!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7063,6 +7106,7 @@ default_imp_for_uas_webhook!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7222,6 +7266,7 @@ default_imp_for_uas_post_authentication!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7382,6 +7427,7 @@ default_imp_for_uas_authentication_confirmation!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7533,6 +7579,7 @@ default_imp_for_connector_request_id!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7688,6 +7735,7 @@ default_imp_for_fraud_check!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -7870,6 +7918,7 @@ default_imp_for_connector_authentication!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8028,6 +8077,7 @@ default_imp_for_uas_authentication!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8181,6 +8231,7 @@ default_imp_for_revenue_recovery!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8393,6 +8444,7 @@ default_imp_for_subscriptions!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8555,6 +8607,7 @@ default_imp_for_billing_connector_payment_sync!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8709,6 +8762,7 @@ default_imp_for_revenue_recovery_record_back!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8870,6 +8924,7 @@ default_imp_for_billing_connector_invoice_sync!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9025,6 +9080,7 @@ default_imp_for_external_vault!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9185,6 +9241,7 @@ default_imp_for_external_vault_insert!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9342,6 +9399,7 @@ default_imp_for_gift_card_balance_check!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -9504,6 +9562,7 @@ default_imp_for_external_vault_retrieve!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9664,6 +9723,7 @@ default_imp_for_external_vault_delete!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9825,6 +9885,7 @@ default_imp_for_external_vault_create!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9986,6 +10047,7 @@ default_imp_for_connector_authentication_token!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Sift,
@@ -10146,6 +10208,7 @@ default_imp_for_external_vault_proxy_payments_create!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -10309,6 +10372,7 @@ default_imp_for_connector_webhook_register!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -11201,6 +11265,7 @@ default_imp_for_generate_qr_flow!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Shift4,
connectors::Sift,
@@ -11362,6 +11427,7 @@ default_imp_for_push_notification_flow!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Shift4,
connectors::Sift,
diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
index abb1762990..9d72918a52 100644
--- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
@@ -443,6 +443,7 @@ default_imp_for_new_connector_integration_payment!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -605,6 +606,7 @@ default_imp_for_new_connector_integration_refund!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -756,6 +758,7 @@ default_imp_for_new_connector_integration_connector_authentication_token!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -912,6 +915,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1074,6 +1078,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1236,6 +1241,7 @@ default_imp_for_new_connector_integration_fetch_disputes!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1399,6 +1405,7 @@ default_imp_for_new_connector_integration_dispute_sync!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1562,6 +1569,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1723,6 +1731,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1895,6 +1904,7 @@ default_imp_for_new_connector_integration_file_upload!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2059,6 +2069,7 @@ default_imp_for_new_connector_integration_payouts_create!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2223,6 +2234,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2387,6 +2399,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2551,6 +2564,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2715,6 +2729,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2879,6 +2894,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3043,6 +3059,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3207,6 +3224,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3369,6 +3387,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3533,6 +3552,7 @@ default_imp_for_new_connector_integration_frm_sale!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3697,6 +3717,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3861,6 +3882,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4025,6 +4047,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4189,6 +4212,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4349,6 +4373,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4480,6 +4505,7 @@ default_imp_for_new_connector_integration_frm!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4639,6 +4665,7 @@ default_imp_for_new_connector_integration_connector_authentication!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4790,6 +4817,7 @@ default_imp_for_new_connector_integration_revenue_recovery!(
connectors::Razorpay,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4976,6 +5004,7 @@ default_imp_for_new_connector_integration_external_vault!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5137,6 +5166,7 @@ default_imp_for_new_connector_integration_external_vault_proxy!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5302,6 +5332,7 @@ default_imp_for_new_connector_integration_webhook_register!(
connectors::Recurly,
connectors::Redsys,
connectors::Revolv3,
+ connectors::Sanlam,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rs
index 6def04e302..3af79b9391 100644
--- a/crates/hyperswitch_connectors/src/utils.rs
+++ b/crates/hyperswitch_connectors/src/utils.rs
@@ -6714,6 +6714,7 @@ pub enum PaymentMethodDataType {
SepaGuarenteedDebit,
BecsBankDebit,
BacsBankDebit,
+ EftDebitOrder,
AchBankTransfer,
SepaBankTransfer,
BacsBankTransfer,
@@ -6890,6 +6891,7 @@ impl From<PaymentMethodData> for PaymentMethodDataType {
},
PaymentMethodData::BankDebit(bank_debit_data) => match bank_debit_data {
payment_method_data::BankDebitData::AchBankDebit { .. } => Self::AchBankDebit,
+ payment_method_data::BankDebitData::EftDebitOrder { .. } => Self::EftDebitOrder,
payment_method_data::BankDebitData::SepaBankDebit { .. } => Self::SepaBankDebit,
payment_method_data::BankDebitData::SepaGuarenteedBankDebit { .. } => {
Self::SepaGuarenteedDebit
diff --git a/crates/hyperswitch_domain_models/src/connector_endpoints.rs b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
index 6ce2c9ad30..2d4eece93d 100644
--- a/crates/hyperswitch_domain_models/src/connector_endpoints.rs
+++ b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
@@ -123,6 +123,7 @@ pub struct Connectors {
pub recurly: ConnectorParams,
pub redsys: ConnectorParams,
pub revolv3: ConnectorParams,
+ pub sanlam: ConnectorParams,
pub riskified: ConnectorParams,
pub santander: ConnectorParams,
pub shift4: ConnectorParams,
diff --git a/crates/hyperswitch_domain_models/src/payment_method_data.rs b/crates/hyperswitch_domain_models/src/payment_method_data.rs
index 9eb56c7250..910a18c871 100644
--- a/crates/hyperswitch_domain_models/src/payment_method_data.rs
+++ b/crates/hyperswitch_domain_models/src/payment_method_data.rs
@@ -13,7 +13,8 @@ use common_utils::{
ext_traits::{OptionExt, StringExt},
id_type,
new_type::{
- MaskedBankAccount, MaskedIban, MaskedRoutingNumber, MaskedSortCode, MaskedUpiVpaId,
+ MaskedBankAccount, MaskedBranchCode, MaskedIban, MaskedRoutingNumber, MaskedSortCode,
+ MaskedUpiVpaId,
},
payout_method_utils,
pii::{self, Email},
@@ -1412,6 +1413,13 @@ pub enum BankDebitData {
sort_code: Secret<String>,
bank_account_holder_name: Option<Secret<String>>,
},
+ EftDebitOrder {
+ account_number: Secret<String>,
+ branch_code: Option<Secret<String>>,
+ bank_account_holder_name: Option<Secret<String>>,
+ bank_name: Option<common_enums::BankNames>,
+ bank_type: Option<common_enums::BankType>,
+ },
}
impl BankDebitData {
@@ -1451,6 +1459,7 @@ impl BankDebitData {
Self::SepaBankDebit { .. }
| Self::SepaGuarenteedBankDebit { .. }
| Self::BecsBankDebit { .. }
+ | Self::EftDebitOrder { .. }
| Self::BacsBankDebit { .. } => None,
}
}
@@ -2807,6 +2816,20 @@ impl From<api_models::payments::BankDebitData> for BankDebitData {
sort_code,
bank_account_holder_name,
},
+ api_models::payments::BankDebitData::EftDebitOrder {
+ account_number,
+ branch_code,
+ bank_account_holder_name,
+ bank_name,
+ bank_type,
+ ..
+ } => Self::EftDebitOrder {
+ account_number,
+ branch_code,
+ bank_account_holder_name,
+ bank_name,
+ bank_type,
+ },
}
}
}
@@ -2831,6 +2854,21 @@ impl From<BankDebitData> for api_models::payments::additional_info::BankDebitAdd
bank_account_holder_name,
},
)),
+ BankDebitData::EftDebitOrder {
+ account_number,
+ branch_code,
+ bank_name,
+ bank_type,
+ bank_account_holder_name,
+ } => Self::EftDebitOrder(Box::new(
+ payment_additional_types::EftDebitOrderAdditionalData {
+ account_number: MaskedBankAccount::from(account_number),
+ branch_code: branch_code.map(MaskedBranchCode::from),
+ bank_name,
+ bank_type,
+ bank_account_holder_name,
+ },
+ )),
BankDebitData::SepaBankDebit {
iban,
bank_account_holder_name,
@@ -3301,6 +3339,7 @@ impl GetPaymentMethodType for BankDebitData {
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
match self {
Self::AchBankDebit { .. } => api_enums::PaymentMethodType::Ach,
+ Self::EftDebitOrder { .. } => api_enums::PaymentMethodType::EftDebitOrder,
Self::SepaBankDebit { .. } => api_enums::PaymentMethodType::Sepa,
Self::SepaGuarenteedBankDebit { .. } => {
api_enums::PaymentMethodType::SepaGuarenteedDebit
diff --git a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
index efd41dbcb9..063ec8395e 100644
--- a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
+++ b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
@@ -671,26 +671,14 @@ impl ForeignTryFrom<payments_grpc::BankType> for common_enums::BankType {
match bank_type {
payments_grpc::BankType::Checking => Ok(Self::Checking),
payments_grpc::BankType::Savings => Ok(Self::Savings),
- payments_grpc::BankType::Unspecified => Err(error_stack::Report::new(
+ payments_grpc::BankType::Bond
+ | payments_grpc::BankType::Transmission
+ | payments_grpc::BankType::Current
+ | payments_grpc::BankType::SubscriptionShare
+ | payments_grpc::BankType::Unspecified => Err(error_stack::Report::new(
UnifiedConnectorServiceError::ResponseDeserializationFailed,
)
- .attach_printable("BankType unspecified")),
- payments_grpc::BankType::Transmission => Err(error_stack::Report::new(
- UnifiedConnectorServiceError::ResponseDeserializationFailed,
- )
- .attach_printable("BankType unspecified")),
- payments_grpc::BankType::Current => Err(error_stack::Report::new(
- UnifiedConnectorServiceError::ResponseDeserializationFailed,
- )
- .attach_printable("BankType unspecified")),
- payments_grpc::BankType::Bond => Err(error_stack::Report::new(
- UnifiedConnectorServiceError::ResponseDeserializationFailed,
- )
- .attach_printable("BankType unspecified")),
- payments_grpc::BankType::SubscriptionShare => Err(error_stack::Report::new(
- UnifiedConnectorServiceError::ResponseDeserializationFailed,
- )
- .attach_printable("BankType unspecified")),
+ .attach_printable("BankType unsupported")),
}
}
}
diff --git a/crates/kgraph_utils/src/mca.rs b/crates/kgraph_utils/src/mca.rs
index 08bde828ff..ee7c48783b 100644
--- a/crates/kgraph_utils/src/mca.rs
+++ b/crates/kgraph_utils/src/mca.rs
@@ -33,6 +33,7 @@ fn get_dir_value_payment_method(
api_enums::PaymentMethodType::Sofort => Ok(dirval!(BankRedirectType = Sofort)),
api_enums::PaymentMethodType::Eps => Ok(dirval!(BankRedirectType = Eps)),
api_enums::PaymentMethodType::Eft => Ok(dirval!(BankRedirectType = Eft)),
+ api_enums::PaymentMethodType::EftDebitOrder => Ok(dirval!(BankDebitType = EftDebitOrder)),
api_enums::PaymentMethodType::Klarna => Ok(dirval!(PayLaterType = Klarna)),
api_enums::PaymentMethodType::Flexiti => Ok(dirval!(PayLaterType = Flexiti)),
api_enums::PaymentMethodType::Affirm => Ok(dirval!(PayLaterType = Affirm)),
diff --git a/crates/kgraph_utils/src/transformers.rs b/crates/kgraph_utils/src/transformers.rs
index cb948d2911..9e07f69110 100644
--- a/crates/kgraph_utils/src/transformers.rs
+++ b/crates/kgraph_utils/src/transformers.rs
@@ -142,6 +142,9 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
api_enums::PaymentMethodType::Ideal => Ok(dirval!(BankRedirectType = Ideal)),
api_enums::PaymentMethodType::Sofort => Ok(dirval!(BankRedirectType = Sofort)),
api_enums::PaymentMethodType::Eft => Ok(dirval!(BankRedirectType = Eft)),
+ api_enums::PaymentMethodType::EftDebitOrder => {
+ Ok(dirval!(BankDebitType = EftDebitOrder))
+ }
api_enums::PaymentMethodType::Eps => Ok(dirval!(BankRedirectType = Eps)),
api_enums::PaymentMethodType::Klarna => Ok(dirval!(PayLaterType = Klarna)),
api_enums::PaymentMethodType::Affirm => Ok(dirval!(PayLaterType = Affirm)),
diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rs
index 64fef49850..0f8af30f03 100644
--- a/crates/openapi/src/openapi.rs
+++ b/crates/openapi/src/openapi.rs
@@ -954,6 +954,7 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::additional_info::CardTokenAdditionalData,
api_models::payments::additional_info::BankDebitAdditionalData,
api_models::payments::additional_info::AchBankDebitAdditionalData,
+ api_models::payments::additional_info::EftDebitOrderAdditionalData,
api_models::payments::additional_info::BacsBankDebitAdditionalData,
api_models::payments::additional_info::BecsBankDebitAdditionalData,
api_models::payments::additional_info::SepaBankDebitAdditionalData,
diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rs
index 0ae55ea9ef..4666ae7633 100644
--- a/crates/openapi/src/openapi_v2.rs
+++ b/crates/openapi/src/openapi_v2.rs
@@ -889,6 +889,7 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::additional_info::CardTokenAdditionalData,
api_models::payments::additional_info::BankDebitAdditionalData,
api_models::payments::additional_info::AchBankDebitAdditionalData,
+ api_models::payments::additional_info::EftDebitOrderAdditionalData,
api_models::payments::additional_info::BacsBankDebitAdditionalData,
api_models::payments::additional_info::BecsBankDebitAdditionalData,
api_models::payments::additional_info::SepaBankDebitAdditionalData,
diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
index 5949e21794..4fb9cba969 100644
--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs
+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
@@ -188,6 +188,10 @@ enum RequiredField {
AchBankDebitRoutingNumber,
AchBankDebitBankType(Vec<enums::BankType>),
AchBankDebitBankAccountHolderName,
+ EftDebitOrderAccountNumber,
+ EftDebitOrderBankType(Vec<enums::BankType>),
+ EftDebitOrderBankAccountHolderName,
+ EftDebitOrderBankName,
SepaBankDebitIban,
BacsBankDebitAccountNumber,
BacsBankDebitSortCode,
@@ -794,6 +798,50 @@ impl RequiredField {
value: None,
},
),
+ Self::EftDebitOrderAccountNumber => (
+ "payment_method_data.bank_debit.eft_debit_order.account_number".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.bank_debit.eft_debit_order.account_number"
+ .to_string(),
+ display_name: "bank_account_number".to_string(),
+ field_type: FieldType::UserBankAccountNumber,
+ value: None,
+ },
+ ),
+ Self::EftDebitOrderBankType(bank_type) => (
+ "payment_method_data.bank_debit.eft_debit_order.bank_type".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.bank_debit.eft_debit_order.bank_type"
+ .to_string(),
+ display_name: "bank_type".to_string(),
+ field_type: FieldType::UserBankType {
+ options: bank_type.iter().map(|bt| bt.to_string()).collect(),
+ },
+ value: None,
+ },
+ ),
+ Self::EftDebitOrderBankAccountHolderName => (
+ "payment_method_data.bank_debit.eft_debit_order.bank_account_holder_name"
+ .to_string(),
+ RequiredFieldInfo {
+ required_field:
+ "payment_method_data.bank_debit.eft_debit_order.bank_account_holder_name"
+ .to_string(),
+ display_name: "bank_account_holder_name".to_string(),
+ field_type: FieldType::UserBankAccountHolderName,
+ value: None,
+ },
+ ),
+ Self::EftDebitOrderBankName => (
+ "payment_method_data.bank_debit.eft_debit_order.bank_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.bank_debit.eft_debit_order.bank_name"
+ .to_string(),
+ display_name: "bank_name".to_string(),
+ field_type: FieldType::UserBank,
+ value: None,
+ },
+ ),
Self::SepaBankDebitIban => (
"payment_method_data.bank_debit.sepa_bank_debit.iban".to_string(),
RequiredFieldInfo {
@@ -3702,6 +3750,26 @@ fn get_bank_debit_required_fields() -> HashMap<enums::PaymentMethodType, Connect
),
]),
),
+ (
+ enums::PaymentMethodType::EftDebitOrder,
+ connectors(vec![(
+ Connector::Sanlam,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: HashMap::from([
+ RequiredField::EftDebitOrderAccountNumber.to_tuple(),
+ RequiredField::EftDebitOrderBankName.to_tuple(),
+ RequiredField::EftDebitOrderBankAccountHolderName.to_tuple(),
+ RequiredField::EftDebitOrderBankType(vec![
+ enums::BankType::Checking,
+ enums::BankType::Savings,
+ ])
+ .to_tuple(),
+ ]),
+ },
+ )]),
+ ),
])
}
diff --git a/crates/payment_methods/src/helpers.rs b/crates/payment_methods/src/helpers.rs
index 4d1496c80f..cd98435e0a 100644
--- a/crates/payment_methods/src/helpers.rs
+++ b/crates/payment_methods/src/helpers.rs
@@ -187,6 +187,7 @@ pub fn validate_payment_method_type_against_payment_method(
api_enums::PaymentMethod::BankDebit => matches!(
payment_method_type,
api_enums::PaymentMethodType::Ach
+ | api_enums::PaymentMethodType::EftDebitOrder
| api_enums::PaymentMethodType::Sepa
| api_enums::PaymentMethodType::SepaGuarenteedDebit
| api_enums::PaymentMethodType::Bacs
diff --git a/crates/router/src/connector.rs b/crates/router/src/connector.rs
index b2dba4c003..3bf8ecc019 100644
--- a/crates/router/src/connector.rs
+++ b/crates/router/src/connector.rs
@@ -42,10 +42,10 @@ pub use hyperswitch_connectors::connectors::{
placetopay::Placetopay, plaid, plaid::Plaid, powertranz, powertranz::Powertranz, prophetpay,
prophetpay::Prophetpay, rapyd, rapyd::Rapyd, razorpay, razorpay::Razorpay, recurly,
recurly::Recurly, redsys, redsys::Redsys, revolv3, revolv3::Revolv3, riskified,
- riskified::Riskified, santander, santander::Santander, shift4, shift4::Shift4, sift,
- sift::Sift, signifyd, signifyd::Signifyd, silverflow, silverflow::Silverflow, square,
- square::Square, stax, stax::Stax, stripe, stripe::Stripe, stripebilling,
- stripebilling::Stripebilling, taxjar, taxjar::Taxjar, tesouro, tesouro::Tesouro,
+ riskified::Riskified, sanlam, sanlam::Sanlam, santander, santander::Santander, shift4,
+ shift4::Shift4, sift, sift::Sift, signifyd, signifyd::Signifyd, silverflow,
+ silverflow::Silverflow, square, square::Square, stax, stax::Stax, stripe, stripe::Stripe,
+ stripebilling, stripebilling::Stripebilling, taxjar, taxjar::Taxjar, tesouro, tesouro::Tesouro,
threedsecureio, threedsecureio::Threedsecureio, thunes, thunes::Thunes, tokenex,
tokenex::Tokenex, tokenio, tokenio::Tokenio, truelayer, truelayer::Truelayer, trustly,
trustly::Trustly, trustpay, trustpay::Trustpay, trustpayments, trustpayments::Trustpayments,
diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs
index afaedf49ce..4891908ccb 100644
--- a/crates/router/src/connector/utils.rs
+++ b/crates/router/src/connector/utils.rs
@@ -2599,6 +2599,7 @@ pub enum PaymentMethodDataType {
OnlineBankingFpx,
OnlineBankingThailand,
AchBankDebit,
+ EftDebitOrder,
SepaBankDebit,
SepaGuarenteedDebit,
BecsBankDebit,
@@ -2777,6 +2778,7 @@ impl From<domain::payments::PaymentMethodData> for PaymentMethodDataType {
domain::payments::BankDebitData::SepaGuarenteedBankDebit { .. } => Self::SepaGuarenteedDebit,
domain::payments::BankDebitData::BecsBankDebit { .. } => Self::BecsBankDebit,
domain::payments::BankDebitData::BacsBankDebit { .. } => Self::BacsBankDebit,
+ domain::payments::BankDebitData::EftDebitOrder { .. } => Self::EftDebitOrder,
}
}
domain::payments::PaymentMethodData::BankTransfer(bank_transfer_data) => {
diff --git a/crates/router/src/core/connector_validation.rs b/crates/router/src/core/connector_validation.rs
index b30b6ac6ed..01653a62e1 100644
--- a/crates/router/src/core/connector_validation.rs
+++ b/crates/router/src/core/connector_validation.rs
@@ -501,6 +501,10 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> {
revolv3::transformers::Revolv3AuthType::try_from(self.auth_type)?;
Ok(())
}
+ api_enums::Connector::Sanlam => {
+ sanlam::transformers::SanlamAuthType::try_from(self.auth_type)?;
+ Ok(())
+ }
api_enums::Connector::Santander => {
santander::requests::SantanderAuthType::try_from(self.auth_type)?;
santander::requests::SantanderMetadataObject::try_from(self.connector_meta_data)?;
diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rs
index bf35cdfe00..8ff742b341 100644
--- a/crates/router/src/core/unified_connector_service.rs
+++ b/crates/router/src/core/unified_connector_service.rs
@@ -1048,16 +1048,12 @@ pub fn build_unified_connector_service_payment_method(
hyperswitch_domain_models::payment_method_data::BankRedirectData::Eft {
provider
} => {
- let eft = payments_grpc::Eft {
- account_number: Some(Secret::new(provider)),
- branch_code: None,
- bank_account_holder_name: None,
- bank_name: Default::default(),
- bank_type: Default::default(),
+ let eft = payments_grpc::EftBankRedirect {
+ provider,
};
Ok(payments_grpc::PaymentMethod {
- payment_method: Some(PaymentMethod::Eft(eft)),
+ payment_method: Some(PaymentMethod::EftBankRedirect(eft)),
})
}
hyperswitch_domain_models::payment_method_data::BankRedirectData::BancontactCard {
@@ -1561,6 +1557,33 @@ pub fn build_unified_connector_service_payment_method(
payment_method: Some(PaymentMethod::SepaGuaranteedDebit(sepa_guaranteed_debit)),
})
}
+ hyperswitch_domain_models::payment_method_data::BankDebitData::EftDebitOrder {
+ account_number,
+ branch_code,
+ bank_account_holder_name,
+ bank_name,
+ bank_type,
+ } => {
+ let bank_name = bank_name
+ .map(payments_grpc::BankNames::foreign_try_from)
+ .transpose()?;
+ let bank_type = bank_type
+ .map(payments_grpc::BankType::foreign_try_from)
+ .transpose()?;
+
+ let eft = payments_grpc::Eft {
+ account_number: Some(account_number.expose().into()),
+ branch_code: branch_code.map(|code| code.expose().into()),
+ bank_account_holder_name: bank_account_holder_name
+ .map(|name| name.expose().into()),
+ bank_name: bank_name.map(Into::into).unwrap_or_default(),
+ bank_type: bank_type.map(Into::into).unwrap_or_default(),
+ };
+
+ Ok(payments_grpc::PaymentMethod {
+ payment_method: Some(PaymentMethod::Eft(eft)),
+ })
+ }
},
hyperswitch_domain_models::payment_method_data::PaymentMethodData::Voucher(voucher_data) => {
match voucher_data {
diff --git a/crates/router/src/core/unified_connector_service/connector_config.rs b/crates/router/src/core/unified_connector_service/connector_config.rs
index 969bf4c3c1..808841aa99 100644
--- a/crates/router/src/core/unified_connector_service/connector_config.rs
+++ b/crates/router/src/core/unified_connector_service/connector_config.rs
@@ -8,7 +8,7 @@ use std::{collections::HashMap, str::FromStr};
use common_enums::{connector_enums::Connector, enums::Currency};
use error_stack::ResultExt;
use hyperswitch_domain_models::router_data::ConnectorAuthType;
-use hyperswitch_masking::Secret;
+use hyperswitch_masking::{PeekInterface, Secret};
use serde::Serialize;
use crate::{
@@ -516,6 +516,11 @@ pub enum ConnectorSpecificConfig {
},
/// Imerchantsolutions connector configuration
Imerchantsolutions { api_key: Secret<String> },
+ /// Sanlam connector configuration
+ Sanlam {
+ api_key: Secret<String>,
+ merchant_id: String,
+ },
}
impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
@@ -1340,7 +1345,6 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
}),
_ => Err(err("Payload requires CurrencyAuthKey auth type")),
},
-
Connector::Worldpayvantiv => match auth {
ConnectorAuthType::SignatureKey {
api_key,
@@ -1365,7 +1369,6 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
"Worldpayvantiv requires SignatureKey or MultiAuthKey auth type",
)),
},
-
Connector::Payme => match auth {
ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::Payme {
seller_payme_id: api_key.clone(),
@@ -1393,7 +1396,6 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
}),
_ => Err(err("Trustly requires SignatureKey auth type")),
},
-
Connector::Itaubank => match auth {
ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::Itaubank {
client_secret: api_key.clone(),
@@ -1401,14 +1403,19 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
}),
_ => Err(err("Itaubank requires BodyKey auth type")),
},
-
Connector::Imerchantsolutions => match auth {
ConnectorAuthType::HeaderKey { api_key } => Ok(Self::Imerchantsolutions {
api_key: api_key.clone(),
}),
_ => Err(err("Imerchantsolutions requires HeaderKey auth type")),
},
-
+ Connector::Sanlam => match auth {
+ ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::Sanlam {
+ api_key: api_key.clone(),
+ merchant_id: key1.peek().clone(),
+ }),
+ _ => Err(err("Sanlam requires BodyKey auth type")),
+ },
// --- Unsupported connectors ---
_ => Err(
error_stack::report!(errors::ApiErrorResponse::InternalServerError)
diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rs
index 6d8bdcebd2..72fe9e9c25 100644
--- a/crates/router/src/core/unified_connector_service/transformers.rs
+++ b/crates/router/src/core/unified_connector_service/transformers.rs
@@ -2048,8 +2048,8 @@ impl transformers::ForeignTryFrom<&RouterData<Session, PaymentsSessionData, Paym
phone_number: None,
phone_country_code: None,
}),
- metadata: None,
return_url: None,
+ metadata: None,
};
Ok(Self {
@@ -3949,6 +3949,7 @@ impl transformers::ForeignTryFrom<common_enums::BankNames> for payments_grpc::Ba
common_enums::BankNames::Yoursafe => Ok(Self::Yoursafe),
common_enums::BankNames::N26 => Ok(Self::N26),
common_enums::BankNames::NationaleNederlanden => Ok(Self::NationaleNederlanden),
+ common_enums::BankNames::Absa => Ok(Self::Absa),
}
}
}
diff --git a/crates/router/src/types/api/connector_mapping.rs b/crates/router/src/types/api/connector_mapping.rs
index ea0a258ffe..63ed100358 100644
--- a/crates/router/src/types/api/connector_mapping.rs
+++ b/crates/router/src/types/api/connector_mapping.rs
@@ -476,6 +476,9 @@ impl ConnectorData {
enums::Connector::Truelayer => {
Ok(ConnectorEnum::Old(Box::new(connector::Truelayer::new())))
}
+ enums::Connector::Sanlam => {
+ Ok(ConnectorEnum::Old(Box::new(connector::Sanlam::new())))
+ }
enums::Connector::Trustly => {
Ok(ConnectorEnum::Old(Box::new(connector::Trustly::new())))
}
diff --git a/crates/router/src/types/api/feature_matrix.rs b/crates/router/src/types/api/feature_matrix.rs
index 07645b5205..09ecd7b1eb 100644
--- a/crates/router/src/types/api/feature_matrix.rs
+++ b/crates/router/src/types/api/feature_matrix.rs
@@ -393,6 +393,9 @@ impl FeatureMatrixConnectorData {
enums::Connector::Truelayer => {
Ok(ConnectorEnum::Old(Box::new(connector::Truelayer::new())))
}
+ enums::Connector::Sanlam => {
+ Ok(ConnectorEnum::Old(Box::new(connector::Sanlam::new())))
+ }
enums::Connector::Trustly => {
Ok(ConnectorEnum::Old(Box::new(connector::Trustly::new())))
}
diff --git a/crates/router/src/types/connector_transformers.rs b/crates/router/src/types/connector_transformers.rs
index f15da18e46..09caa5bdff 100644
--- a/crates/router/src/types/connector_transformers.rs
+++ b/crates/router/src/types/connector_transformers.rs
@@ -61,6 +61,7 @@ impl ForeignTryFrom<api_enums::Connector> for euclid::enums::RoutableConnectors
api_enums::Connector::Ebanx => Self::Ebanx,
api_enums::Connector::Elavon => Self::Elavon,
api_enums::Connector::Envoy => Self::Envoy,
+ api_enums::Connector::Sanlam => Self::Sanlam,
api_enums::Connector::Facilitapay => Self::Facilitapay,
api_enums::Connector::Finix => Self::Finix,
api_enums::Connector::Fiserv => Self::Fiserv,
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index d236f07b75..c51b0a686f 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -363,6 +363,7 @@ impl ForeignFrom<api_enums::PaymentMethodType> for api_enums::PaymentMethod {
| api_enums::PaymentMethodType::Sepa
| api_enums::PaymentMethodType::SepaGuarenteedDebit
| api_enums::PaymentMethodType::Bacs
+ | api_enums::PaymentMethodType::EftDebitOrder
| api_enums::PaymentMethodType::Becs => Self::BankDebit,
api_enums::PaymentMethodType::Credit | api_enums::PaymentMethodType::Debit => {
Self::Card
diff --git a/crates/router/tests/connectors/main.rs b/crates/router/tests/connectors/main.rs
index 6688ea50c3..9078fc293a 100644
--- a/crates/router/tests/connectors/main.rs
+++ b/crates/router/tests/connectors/main.rs
@@ -112,6 +112,7 @@ mod rapyd;
mod razorpay;
mod redsys;
mod revolv3;
+mod sanlam;
mod santander;
mod shift4;
mod sift;
diff --git a/crates/router/tests/connectors/sample_auth.toml b/crates/router/tests/connectors/sample_auth.toml
index 323d7c0c31..e6319c7f38 100644
--- a/crates/router/tests/connectors/sample_auth.toml
+++ b/crates/router/tests/connectors/sample_auth.toml
@@ -393,4 +393,8 @@ api_key = "Client ID"
key1 = "Client Secret"
[imerchantsolutions]
-api_key = "API Key"
\ No newline at end of file
+api_key = "API Key"
+
+[sanlam]
+api_key = "API Key"
+key1 = "Merchant Id"
\ No newline at end of file
diff --git a/crates/router/tests/connectors/sanlam.rs b/crates/router/tests/connectors/sanlam.rs
new file mode 100644
index 0000000000..a337b11ed7
--- /dev/null
+++ b/crates/router/tests/connectors/sanlam.rs
@@ -0,0 +1,421 @@
+use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
+use hyperswitch_masking::Secret;
+use router::types::{self, api, storage::enums};
+use test_utils::connector_auth;
+
+use crate::utils::{self, ConnectorActions};
+
+#[derive(Clone, Copy)]
+struct SanlamTest;
+impl ConnectorActions for SanlamTest {}
+impl utils::Connector for SanlamTest {
+ fn get_data(&self) -> api::ConnectorData {
+ use router::connector::Sanlam;
+ utils::construct_connector_data_old(
+ Box::new(Sanlam::new()),
+ types::Connector::Plaid,
+ api::GetToken::Connector,
+ None,
+ )
+ }
+
+ fn get_auth_token(&self) -> types::ConnectorAuthType {
+ utils::to_connector_auth_type(
+ connector_auth::ConnectorAuthentication::new()
+ .sanlam
+ .expect("Missing connector authentication configuration")
+ .into(),
+ )
+ }
+
+ fn get_name(&self) -> String {
+ "sanlam".to_string()
+ }
+}
+
+static CONNECTOR: SanlamTest = SanlamTest {};
+
+fn get_default_payment_info() -> Option<utils::PaymentInfo> {
+ None
+}
+
+fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
+ None
+}
+
+// Cards Positive Tests
+// Creates a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_only_authorize_payment() {
+ let response = CONNECTOR
+ .authorize_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .expect("Authorize payment response");
+ assert_eq!(response.status, enums::AttemptStatus::Authorized);
+}
+
+// Captures a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_capture_authorized_payment() {
+ let response = CONNECTOR
+ .authorize_and_capture_payment(payment_method_details(), None, get_default_payment_info())
+ .await
+ .expect("Capture payment response");
+ assert_eq!(response.status, enums::AttemptStatus::Charged);
+}
+
+// Partially captures a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_partially_capture_authorized_payment() {
+ let response = CONNECTOR
+ .authorize_and_capture_payment(
+ payment_method_details(),
+ Some(types::PaymentsCaptureData {
+ amount_to_capture: 50,
+ ..utils::PaymentCaptureType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .expect("Capture payment response");
+ assert_eq!(response.status, enums::AttemptStatus::Charged);
+}
+
+// Synchronizes a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_sync_authorized_payment() {
+ let authorize_response = CONNECTOR
+ .authorize_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .expect("Authorize payment response");
+ let txn_id = utils::get_connector_transaction_id(authorize_response.response);
+ let response = CONNECTOR
+ .psync_retry_till_status_matches(
+ enums::AttemptStatus::Authorized,
+ Some(types::PaymentsSyncData {
+ connector_transaction_id: types::ResponseId::ConnectorTransactionId(
+ txn_id.unwrap(),
+ ),
+ ..Default::default()
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .expect("PSync response");
+ assert_eq!(response.status, enums::AttemptStatus::Authorized,);
+}
+
+// Voids a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_void_authorized_payment() {
+ let response = CONNECTOR
+ .authorize_and_void_payment(
+ payment_method_details(),
+ Some(types::PaymentsCancelData {
+ connector_transaction_id: String::from(""),
+ cancellation_reason: Some("requested_by_customer".to_string()),
+ ..Default::default()
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .expect("Void payment response");
+ assert_eq!(response.status, enums::AttemptStatus::Voided);
+}
+
+// Refunds a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_refund_manually_captured_payment() {
+ let response = CONNECTOR
+ .capture_payment_and_refund(
+ payment_method_details(),
+ None,
+ None,
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap().refund_status,
+ enums::RefundStatus::Success,
+ );
+}
+
+// Partially refunds a payment using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_partially_refund_manually_captured_payment() {
+ let response = CONNECTOR
+ .capture_payment_and_refund(
+ payment_method_details(),
+ None,
+ Some(types::RefundsData {
+ refund_amount: 50,
+ ..utils::PaymentRefundType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap().refund_status,
+ enums::RefundStatus::Success,
+ );
+}
+
+// Synchronizes a refund using the manual capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_sync_manually_captured_refund() {
+ let refund_response = CONNECTOR
+ .capture_payment_and_refund(
+ payment_method_details(),
+ None,
+ None,
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ let response = CONNECTOR
+ .rsync_retry_till_status_matches(
+ enums::RefundStatus::Success,
+ refund_response.response.unwrap().connector_refund_id,
+ None,
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap().refund_status,
+ enums::RefundStatus::Success,
+ );
+}
+
+// Creates a payment using the automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_make_payment() {
+ let authorize_response = CONNECTOR
+ .make_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .unwrap();
+ assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
+}
+
+// Synchronizes a payment using the automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_sync_auto_captured_payment() {
+ let authorize_response = CONNECTOR
+ .make_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .unwrap();
+ assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
+ let txn_id = utils::get_connector_transaction_id(authorize_response.response);
+ assert_ne!(txn_id, None, "Empty connector transaction id");
+ let response = CONNECTOR
+ .psync_retry_till_status_matches(
+ enums::AttemptStatus::Charged,
+ Some(types::PaymentsSyncData {
+ connector_transaction_id: types::ResponseId::ConnectorTransactionId(
+ txn_id.unwrap(),
+ ),
+ capture_method: Some(enums::CaptureMethod::Automatic),
+ ..Default::default()
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.status, enums::AttemptStatus::Charged,);
+}
+
+// Refunds a payment using the automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_refund_auto_captured_payment() {
+ let response = CONNECTOR
+ .make_payment_and_refund(payment_method_details(), None, get_default_payment_info())
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap().refund_status,
+ enums::RefundStatus::Success,
+ );
+}
+
+// Partially refunds a payment using the automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_partially_refund_succeeded_payment() {
+ let refund_response = CONNECTOR
+ .make_payment_and_refund(
+ payment_method_details(),
+ Some(types::RefundsData {
+ refund_amount: 50,
+ ..utils::PaymentRefundType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ refund_response.response.unwrap().refund_status,
+ enums::RefundStatus::Success,
+ );
+}
+
+// Creates multiple refunds against a payment using the automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_refund_succeeded_payment_multiple_times() {
+ CONNECTOR
+ .make_payment_and_multiple_refund(
+ payment_method_details(),
+ Some(types::RefundsData {
+ refund_amount: 50,
+ ..utils::PaymentRefundType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await;
+}
+
+// Synchronizes a refund using the automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_sync_refund() {
+ let refund_response = CONNECTOR
+ .make_payment_and_refund(payment_method_details(), None, get_default_payment_info())
+ .await
+ .unwrap();
+ let response = CONNECTOR
+ .rsync_retry_till_status_matches(
+ enums::RefundStatus::Success,
+ refund_response.response.unwrap().connector_refund_id,
+ None,
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap().refund_status,
+ enums::RefundStatus::Success,
+ );
+}
+
+// Cards Negative scenarios
+// Creates a payment with incorrect CVC.
+#[actix_web::test]
+async fn should_fail_payment_for_incorrect_cvc() {
+ let response = CONNECTOR
+ .make_payment(
+ Some(types::PaymentsAuthorizeData {
+ payment_method_data: PaymentMethodData::Card(Card {
+ card_cvc: Secret::new("12345".to_string()),
+ ..utils::CCardType::default().0
+ }),
+ ..utils::PaymentAuthorizeType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap_err().message,
+ "Your card's security code is invalid.".to_string(),
+ );
+}
+
+// Creates a payment with incorrect expiry month.
+#[actix_web::test]
+async fn should_fail_payment_for_invalid_exp_month() {
+ let response = CONNECTOR
+ .make_payment(
+ Some(types::PaymentsAuthorizeData {
+ payment_method_data: PaymentMethodData::Card(Card {
+ card_exp_month: Secret::new("20".to_string()),
+ ..utils::CCardType::default().0
+ }),
+ ..utils::PaymentAuthorizeType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap_err().message,
+ "Your card's expiration month is invalid.".to_string(),
+ );
+}
+
+// Creates a payment with incorrect expiry year.
+#[actix_web::test]
+async fn should_fail_payment_for_incorrect_expiry_year() {
+ let response = CONNECTOR
+ .make_payment(
+ Some(types::PaymentsAuthorizeData {
+ payment_method_data: PaymentMethodData::Card(Card {
+ card_exp_year: Secret::new("2000".to_string()),
+ ..utils::CCardType::default().0
+ }),
+ ..utils::PaymentAuthorizeType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap_err().message,
+ "Your card's expiration year is invalid.".to_string(),
+ );
+}
+
+// Voids a payment using automatic capture flow (Non 3DS).
+#[actix_web::test]
+async fn should_fail_void_payment_for_auto_capture() {
+ let authorize_response = CONNECTOR
+ .make_payment(payment_method_details(), get_default_payment_info())
+ .await
+ .unwrap();
+ assert_eq!(authorize_response.status, enums::AttemptStatus::Charged);
+ let txn_id = utils::get_connector_transaction_id(authorize_response.response);
+ assert_ne!(txn_id, None, "Empty connector transaction id");
+ let void_response = CONNECTOR
+ .void_payment(txn_id.unwrap(), None, get_default_payment_info())
+ .await
+ .unwrap();
+ assert_eq!(
+ void_response.response.unwrap_err().message,
+ "You cannot cancel this PaymentIntent because it has a status of succeeded."
+ );
+}
+
+// Captures a payment using invalid connector payment id.
+#[actix_web::test]
+async fn should_fail_capture_for_invalid_payment() {
+ let capture_response = CONNECTOR
+ .capture_payment("123456789".to_string(), None, get_default_payment_info())
+ .await
+ .unwrap();
+ assert_eq!(
+ capture_response.response.unwrap_err().message,
+ String::from("No such payment_intent: '123456789'")
+ );
+}
+
+// Refunds a payment with refund amount higher than payment amount.
+#[actix_web::test]
+async fn should_fail_for_refund_amount_higher_than_payment_amount() {
+ let response = CONNECTOR
+ .make_payment_and_refund(
+ payment_method_details(),
+ Some(types::RefundsData {
+ refund_amount: 150,
+ ..utils::PaymentRefundType::default().0
+ }),
+ get_default_payment_info(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ response.response.unwrap_err().message,
+ "Refund amount (₹1.50) is greater than charge amount (₹1.00)",
+ );
+}
+
+// Connector dependent test cases goes here
+
+// [#478]: add unit tests for non 3DS, wallets & webhooks in connector tests
diff --git a/crates/test_utils/src/connector_auth.rs b/crates/test_utils/src/connector_auth.rs
index 1ea1cec6b4..4de8f5e27b 100644
--- a/crates/test_utils/src/connector_auth.rs
+++ b/crates/test_utils/src/connector_auth.rs
@@ -120,6 +120,7 @@ pub struct ConnectorAuthentication {
pub recurly: Option<HeaderKey>,
pub redsys: Option<HeaderKey>,
pub revolv3: Option<HeaderKey>,
+ pub sanlam: Option<BodyKey>,
pub santander: Option<BodyKey>,
pub shift4: Option<HeaderKey>,
pub sift: Option<HeaderKey>,
diff --git a/crates/test_utils/tests/sample_auth.toml b/crates/test_utils/tests/sample_auth.toml
index c2ab67fe93..e6b777d094 100644
--- a/crates/test_utils/tests/sample_auth.toml
+++ b/crates/test_utils/tests/sample_auth.toml
@@ -183,4 +183,8 @@ api_key="Client ID"
key1="Client Secret"
[imerchantsolutions]
-api_key = "API Key"
\ No newline at end of file
+api_key = "API Key"
+
+[sanlam]
+api_key = "API Key"
+key1 = "Merchant Id"
\ No newline at end of file
diff --git a/loadtest/config/development.toml b/loadtest/config/development.toml
index 58c5bf4d84..7d686a3d17 100644
--- a/loadtest/config/development.toml
+++ b/loadtest/config/development.toml
@@ -206,6 +206,7 @@ razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
+sanlam.base_url = "dev"
riskified.base_url = "https://sandbox.riskified.com/api"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
diff --git a/scripts/add_connector.sh b/scripts/add_connector.sh
index 3312323f7c..73e46eb2e2 100755
--- a/scripts/add_connector.sh
+++ b/scripts/add_connector.sh
@@ -6,7 +6,7 @@ function find_prev_connector() {
git checkout $self
cp $self $self.tmp
# Add new connector to existing list and sort it
- connectors=(aci adyen adyenplatform affirm airwallex amazonpay applepay archipel authipay authorizedotnet bambora bamboraapac bankofamerica barclaycard billwerk bitpay blackhawknetwork bluesnap boku braintree breadpay calida cashtocode celero chargebee checkbook checkout coinbase cryptopay ctp_visa custombilling cybersource cybersourcedecisionmanager datatrans deutschebank digitalvirgo dlocal dummyconnector dwolla ebanx elavon envoy facilitapay finix fiserv fiservcommercehub fiservemea fiuu flexiti forte getnet gigadat globalpay globepay gocardless gpayments helcim hipay hyperpg hyperswitch_vault hyperwallet hyperwallet iatapay imerchantsolutions inespay itaubank jpmorgan juspaythreedsserver katapult klarna loonio mifinity mollie moneris mpgs multisafepay netcetera nexinets nexixpay nomupay noon nordea novalnet nuvei opayo opennode paybox payeezy payjustnow payjustnowinstore payload payme payone paypal paysafe paystack paytm payu peachpayments phonepe placetopay plaid powertranz prophetpay rapyd razorpay recurly redsys revolv3 santander shift4 sift silverflow square stax stripe stripebilling taxjar tesouro threedsecureio thunes tokenex tokenio truelayer trustly trustpay trustpayments tsys unified_authentication_service vgs volt wellsfargo wellsfargopayout wise worldline worldpay worldpaymodular worldpayvantiv worldpayxml xendit zift zsl "$1")
+ connectors=(aci adyen adyenplatform affirm airwallex amazonpay applepay archipel authipay authorizedotnet bambora bamboraapac bankofamerica barclaycard billwerk bitpay blackhawknetwork bluesnap boku braintree breadpay calida cashtocode celero chargebee checkbook checkout coinbase cryptopay ctp_visa custombilling cybersource cybersourcedecisionmanager datatrans deutschebank digitalvirgo dlocal dummyconnector dwolla ebanx elavon envoy facilitapay finix fiserv fiservcommercehub fiservemea fiuu flexiti forte getnet gigadat globalpay globepay gocardless gpayments helcim hipay hyperpg hyperswitch_vault hyperwallet hyperwallet iatapay imerchantsolutions inespay itaubank jpmorgan juspaythreedsserver katapult klarna loonio mifinity mollie moneris mpgs multisafepay netcetera nexinets nexixpay nomupay noon nordea novalnet nuvei opayo opennode paybox payeezy payjustnow payjustnowinstore payload payme payone paypal paysafe paystack paytm payu peachpayments phonepe placetopay plaid powertranz prophetpay rapyd razorpay recurly redsys revolv3 sanlam santander shift4 sift silverflow square stax stripe stripebilling taxjar tesouro threedsecureio thunes tokenex tokenio truelayer trustly trustpay trustpayments tsys unified_authentication_service vgs volt wellsfargo wellsfargopayout wise worldline worldpay worldpaymodular worldpayvantiv worldpayxml xendit zift zsl "$1")
IFS=$'\n' sorted=($(sort <<<"${connectors[*]}")); unset IFS