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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(connector): [DLOCAL, MOLLIE, MIFINITY, RAZORPAY, VOLT] add in feature matrix api (#7290)
Swangi Kumarieef1aeb0f536
diff --git a/config/config.example.toml b/config/config.example.tomlindex 78ec91dd7c..341ff3e613 100644--- a/config/config.example.toml+++ b/config/config.example.toml@@ -614,6 +614,17 @@ mifinity = { country = "BR,CN,SG,MY,DE,CH,DK,GB,ES,AD,GI,FI,FR,GR,HR,IT,JP,MX,AR[pm_filters.fiuu]duit_now = { country = "MY", currency = "MYR" }+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.mollie]+credit = { not_available_flows = { capture_method = "manual" } }+debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }+[connector_customer]connector_list = "gocardless,stax,stripe"payout_connector_list = "stripe,wise"diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.tomlindex 4cc67d0daf..fb40538570 100644--- a/config/deployments/integration_test.toml+++ b/config/deployments/integration_test.toml@@ -404,6 +404,17 @@ duit_now = { country = "MY", currency = "MYR" }apple_pay = { country = "MY", currency = "MYR" }google_pay = { country = "MY", currency = "MYR" }+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.mollie]+credit = { not_available_flows = { capture_method = "manual" } }+debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }+[payout_method_filters.adyenplatform]sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }diff --git a/config/deployments/production.toml b/config/deployments/production.tomlindex 7b5f0aba30..70a532b5ca 100644--- a/config/deployments/production.toml+++ b/config/deployments/production.toml@@ -420,6 +420,17 @@ duit_now = { country = "MY", currency = "MYR" }apple_pay = { country = "MY", currency = "MYR" }google_pay = { country = "MY", currency = "MYR" }+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.mollie]+credit = { not_available_flows = { capture_method = "manual" } }+debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }+[payout_method_filters.adyenplatform]sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.tomlindex e0b04ca057..0de2bd26f2 100644--- a/config/deployments/sandbox.toml+++ b/config/deployments/sandbox.toml@@ -421,6 +421,17 @@ duit_now = { country = "MY", currency = "MYR" }apple_pay = { country = "MY", currency = "MYR" }google_pay = { country = "MY", currency = "MYR" }+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.mollie]+credit = { not_available_flows = { capture_method = "manual" } }+debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }+[payout_method_filters.adyenplatform]sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }diff --git a/config/development.toml b/config/development.tomlindex 5a06b022c3..ddd1a8bc96 100644--- a/config/development.toml+++ b/config/development.toml@@ -597,6 +597,9 @@ debit = { not_available_flows = { capture_method = "manual" } }[pm_filters.mollie]credit = { not_available_flows = { capture_method = "manual" } }debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }[pm_filters.multisafepay]credit = { not_available_flows = { capture_method = "manual" } }@@ -637,6 +640,11 @@ duit_now = { country = "MY", currency = "MYR" }apple_pay = { country = "MY", currency = "MYR" }google_pay = { country = "MY", currency = "MYR" }+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.inespay]sepa = { currency = "EUR" }diff --git a/config/docker_compose.toml b/config/docker_compose.tomlindex 6d2e20d1a3..4a1931632c 100644--- a/config/docker_compose.toml+++ b/config/docker_compose.toml@@ -537,6 +537,17 @@ apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,D[pm_filters.fiuu]duit_now = { country = "MY", currency = "MYR" }+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.mollie]+credit = { not_available_flows = { capture_method = "manual" } }+debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }+[bank_config.online_banking_fpx]adyen.banks = "affin_bank,agro_bank,alliance_bank,am_bank,bank_islam,bank_muamalat,bank_rakyat,bank_simpanan_nasional,cimb_bank,hong_leong_bank,hsbc_bank,kuwait_finance_house,maybank,ocbc_bank,public_bank,rhb_bank,standard_chartered_bank,uob_bank"fiuu.banks = "affin_bank,agro_bank,alliance_bank,am_bank,bank_of_china,bank_islam,bank_muamalat,bank_rakyat,bank_simpanan_nasional,cimb_bank,hong_leong_bank,hsbc_bank,kuwait_finance_house,maybank,ocbc_bank,public_bank,rhb_bank,standard_chartered_bank,uob_bank"diff --git a/crates/hyperswitch_connectors/src/connectors/dlocal.rs b/crates/hyperswitch_connectors/src/connectors/dlocal.rsindex 0aefd65e4a..60813a4ea0 100644--- a/crates/hyperswitch_connectors/src/connectors/dlocal.rs+++ b/crates/hyperswitch_connectors/src/connectors/dlocal.rs@@ -25,7 +25,10 @@ use hyperswitch_domain_models::{PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,RefundsData, SetupMandateRequestData,},- router_response_types::{PaymentsResponseData, RefundsResponseData},+ router_response_types::{+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,+ SupportedPaymentMethods, SupportedPaymentMethodsExt,+ },types::{PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,@@ -42,14 +45,11 @@ use hyperswitch_interfaces::{types::{self, Response},webhooks,};+use lazy_static::lazy_static;use masking::{Mask, Maskable, PeekInterface};use transformers as dlocal;-use crate::{- constants::headers,- types::ResponseRouterData,- utils::{self},-};+use crate::{constants::headers, types::ResponseRouterData};#[derive(Debug, Clone)]pub struct Dlocal;@@ -156,24 +156,7 @@ impl ConnectorCommon for Dlocal {}}-impl ConnectorValidation for Dlocal {- fn validate_connector_against_payment_request(- &self,- capture_method: Option<enums::CaptureMethod>,- _payment_method: enums::PaymentMethod,- _pmt: Option<enums::PaymentMethodType>,- ) -> CustomResult<(), errors::ConnectorError> {- let capture_method = capture_method.unwrap_or_default();- match capture_method {- enums::CaptureMethod::Automatic- | enums::CaptureMethod::Manual- | enums::CaptureMethod::SequentialAutomatic => Ok(()),- enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(- utils::construct_not_supported_error_report(capture_method, self.id()),- ),- }- }-}+impl ConnectorValidation for Dlocal {}impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>for Dlocal@@ -693,4 +676,90 @@ impl webhooks::IncomingWebhook for Dlocal {}}-impl ConnectorSpecifications for Dlocal {}+lazy_static! {+ static ref DLOCAL_SUPPORTED_PAYMENT_METHODS: SupportedPaymentMethods = {+ let supported_capture_methods = vec![+ enums::CaptureMethod::Automatic,+ enums::CaptureMethod::Manual,+ enums::CaptureMethod::SequentialAutomatic,+ ];++ let supported_card_network = vec![+ common_enums::CardNetwork::Visa,+ common_enums::CardNetwork::Mastercard,+ common_enums::CardNetwork::AmericanExpress,+ common_enums::CardNetwork::Discover,+ common_enums::CardNetwork::JCB,+ common_enums::CardNetwork::DinersClub,+ common_enums::CardNetwork::UnionPay,+ common_enums::CardNetwork::Interac,+ common_enums::CardNetwork::CartesBancaires,++ ];++ let mut dlocal_supported_payment_methods = SupportedPaymentMethods::new();++ dlocal_supported_payment_methods.add(+ enums::PaymentMethod::Card,+ enums::PaymentMethodType::Credit,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: Some(+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({+ api_models::feature_matrix::CardSpecificFeatures {+ three_ds: common_enums::FeatureStatus::Supported,+ no_three_ds: common_enums::FeatureStatus::Supported,+ supported_card_networks: supported_card_network.clone(),+ }+ }),+ ),+ },+ );+ dlocal_supported_payment_methods.add(+ enums::PaymentMethod::Card,+ enums::PaymentMethodType::Debit,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: Some(+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({+ api_models::feature_matrix::CardSpecificFeatures {+ three_ds: common_enums::FeatureStatus::Supported,+ no_three_ds: common_enums::FeatureStatus::Supported,+ supported_card_networks: supported_card_network.clone(),+ }+ }),+ ),+ },+ );++ dlocal_supported_payment_methods+ };++ static ref DLOCAL_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {+ display_name: "DLOCAL",+ description:+ "Dlocal is a cross-border payment processor enabling businesses to accept and send payments in emerging markets worldwide.",+ connector_type: enums::PaymentConnectorCategory::PaymentGateway,+ };++ static ref DLOCAL_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = Vec::new();++}++impl ConnectorSpecifications for Dlocal {+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {+ Some(&*DLOCAL_CONNECTOR_INFO)+ }++ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {+ Some(&*DLOCAL_SUPPORTED_PAYMENT_METHODS)+ }++ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {+ Some(&*DLOCAL_SUPPORTED_WEBHOOK_FLOWS)+ }+}diff --git a/crates/hyperswitch_connectors/src/connectors/mifinity.rs b/crates/hyperswitch_connectors/src/connectors/mifinity.rsindex 618e987430..3b597597e3 100644--- a/crates/hyperswitch_connectors/src/connectors/mifinity.rs+++ b/crates/hyperswitch_connectors/src/connectors/mifinity.rs@@ -1,6 +1,7 @@pub mod transformers;use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};+use common_enums::enums;use common_utils::{errors::CustomResult,ext_traits::BytesExt,@@ -20,7 +21,10 @@ use hyperswitch_domain_models::{PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,RefundsData, SetupMandateRequestData,},- router_response_types::{PaymentsResponseData, RefundsResponseData},+ router_response_types::{+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,+ SupportedPaymentMethods, SupportedPaymentMethodsExt,+ },types::{PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,RefundsRouterData,@@ -38,6 +42,7 @@ use hyperswitch_interfaces::{types::{self, Response},webhooks::{IncomingWebhook, IncomingWebhookRequestDetails},};+use lazy_static::lazy_static;use masking::{ExposeInterface, Mask};use router_env::logger;use transformers::{self as mifinity, auth_headers};@@ -500,4 +505,46 @@ impl IncomingWebhook for Mifinity {}}-impl ConnectorSpecifications for Mifinity {}+lazy_static! {+ static ref MIFINITY_SUPPORTED_PAYMENT_METHODS: SupportedPaymentMethods = {+ let supported_capture_methods = vec![enums::CaptureMethod::Automatic];++ let mut mifinity_supported_payment_methods = SupportedPaymentMethods::new();+ mifinity_supported_payment_methods.add(+ enums::PaymentMethod::Wallet,+ enums::PaymentMethodType::Mifinity,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::NotSupported,+ supported_capture_methods,+ specific_features: None,+ },+ );++ mifinity_supported_payment_methods+ };++ static ref MIFINITY_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {+ display_name: "MIFINITY",+ description:+ "Mifinity is a payment gateway empowering you to pay online, receive funds, and send money globally, the MiFinity eWallet supports super-low fees, offering infinite possibilities to do more of the things you love.",+ connector_type: enums::PaymentConnectorCategory::PaymentGateway,+ };++ static ref MIFINITY_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = Vec::new();++}++impl ConnectorSpecifications for Mifinity {+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {+ Some(&*MIFINITY_CONNECTOR_INFO)+ }++ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {+ Some(&*MIFINITY_SUPPORTED_PAYMENT_METHODS)+ }++ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {+ Some(&*MIFINITY_SUPPORTED_WEBHOOK_FLOWS)+ }+}diff --git a/crates/hyperswitch_connectors/src/connectors/mollie.rs b/crates/hyperswitch_connectors/src/connectors/mollie.rsindex 8cdf4f03a7..325c031c33 100644--- a/crates/hyperswitch_connectors/src/connectors/mollie.rs+++ b/crates/hyperswitch_connectors/src/connectors/mollie.rs@@ -21,7 +21,10 @@ use hyperswitch_domain_models::{PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData,PaymentsSyncData, RefundsData, SetupMandateRequestData,},- router_response_types::{PaymentsResponseData, RefundsResponseData},+ router_response_types::{+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,+ SupportedPaymentMethods, SupportedPaymentMethodsExt,+ },types::{PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData, TokenizationRouterData,@@ -38,10 +41,11 @@ use hyperswitch_interfaces::{types::{self, Response},webhooks,};+use lazy_static::lazy_static;use masking::{Mask, PeekInterface};use transformers as mollie;-// use self::mollie::{webhook_headers, VoltWebhookBodyEventType};+// use self::mollie::{webhook_headers, MollieWebhookBodyEventType};use crate::{constants::headers, types::ResponseRouterData, utils::convert_amount};#[derive(Clone)]@@ -635,4 +639,178 @@ impl ConnectorRedirectResponse for Mollie {}}-impl ConnectorSpecifications for Mollie {}+// impl ConnectorSpecifications for Mollie {}+lazy_static! {+ static ref MOLLIE_SUPPORTED_PAYMENT_METHODS: SupportedPaymentMethods = {+ let supported_capture_methods = vec![+ enums::CaptureMethod::Automatic,+ enums::CaptureMethod::SequentialAutomatic,+ ];+ let supported_card_network = vec![+ common_enums::CardNetwork::Visa,+ common_enums::CardNetwork::Mastercard,+ common_enums::CardNetwork::AmericanExpress,+ common_enums::CardNetwork::Discover,+ common_enums::CardNetwork::JCB,+ common_enums::CardNetwork::DinersClub,+ common_enums::CardNetwork::UnionPay,+ common_enums::CardNetwork::Interac,+ common_enums::CardNetwork::CartesBancaires,++ ];++ let mut mollie_supported_payment_methods = SupportedPaymentMethods::new();+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::Card,+ enums::PaymentMethodType::Credit,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: Some(+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({+ api_models::feature_matrix::CardSpecificFeatures {+ three_ds: common_enums::FeatureStatus::Supported,+ no_three_ds: common_enums::FeatureStatus::Supported,+ supported_card_networks: supported_card_network.clone(),+ }+ }),+ ),+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::Card,+ enums::PaymentMethodType::Debit,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: Some(+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({+ api_models::feature_matrix::CardSpecificFeatures {+ three_ds: common_enums::FeatureStatus::Supported,+ no_three_ds: common_enums::FeatureStatus::Supported,+ supported_card_networks: supported_card_network.clone(),+ }+ }),+ ),+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::Eps,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::Giropay,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::Ideal,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::Sofort,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::Przelewy24,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::BancontactCard,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::Wallet,+ enums::PaymentMethodType::Paypal,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::Wallet,+ enums::PaymentMethodType::ApplePay,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );+ mollie_supported_payment_methods.add(+ enums::PaymentMethod::BankDebit,+ enums::PaymentMethodType::Sepa,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: None,+ },+ );++ mollie_supported_payment_methods+ };++ static ref MOLLIE_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {+ display_name: "MOLLIE",+ description:+ "Mollie is a Developer-friendly processor providing simple and customizable payment solutions for businesses of all sizes.",+ connector_type: enums::PaymentConnectorCategory::PaymentGateway,+ };++ static ref MOLLIE_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = Vec::new();++}++impl ConnectorSpecifications for Mollie {+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {+ Some(&*MOLLIE_CONNECTOR_INFO)+ }++ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {+ Some(&*MOLLIE_SUPPORTED_PAYMENT_METHODS)+ }++ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {+ Some(&*MOLLIE_SUPPORTED_WEBHOOK_FLOWS)+ }+}diff --git a/crates/hyperswitch_connectors/src/connectors/razorpay.rs b/crates/hyperswitch_connectors/src/connectors/razorpay.rsindex f5f3aa85e8..435ff983c8 100644--- a/crates/hyperswitch_connectors/src/connectors/razorpay.rs+++ b/crates/hyperswitch_connectors/src/connectors/razorpay.rs@@ -1,6 +1,7 @@pub mod transformers;use api_models::webhooks::{self, IncomingWebhookEvent};+use common_enums::enums;use common_utils::{errors::CustomResult,ext_traits::{ByteSliceExt, BytesExt},@@ -20,7 +21,10 @@ use hyperswitch_domain_models::{PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,RefundsData, SetupMandateRequestData,},- router_response_types::{PaymentsResponseData, RefundsResponseData},+ router_response_types::{+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,+ SupportedPaymentMethods, SupportedPaymentMethodsExt,+ },types::{PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,RefundSyncRouterData, RefundsRouterData,@@ -38,6 +42,7 @@ use hyperswitch_interfaces::{types::{self, Response},webhooks::{IncomingWebhook, IncomingWebhookRequestDetails},};+use lazy_static::lazy_static;use masking::{ExposeInterface, Mask};use router_env::logger;use transformers as razorpay;@@ -676,4 +681,46 @@ fn get_webhook_object_from_body(Ok(details.payload)}-impl ConnectorSpecifications for Razorpay {}+lazy_static! {+ static ref RAZORPAY_SUPPORTED_PAYMENT_METHODS: SupportedPaymentMethods = {+ let supported_capture_methods = vec![enums::CaptureMethod::Automatic];++ let mut razorpay_supported_payment_methods = SupportedPaymentMethods::new();+ razorpay_supported_payment_methods.add(+ enums::PaymentMethod::Upi,+ enums::PaymentMethodType::UpiCollect,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods,+ specific_features: None,+ },+ );++ razorpay_supported_payment_methods+ };++ static ref RAZORPAY_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {+ display_name: "RAZORPAY",+ description:+ "Razorpay helps you accept online payments from customers across Desktop, Mobile web, Android & iOS. Additionally by using Razorpay Payment Links, you can collect payments across multiple channels like SMS, Email, Whatsapp, Chatbots & Messenger.",+ connector_type: enums::PaymentConnectorCategory::PaymentGateway,+ };++ static ref RAZORPAY_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = vec![enums::EventClass::Payments, enums::EventClass::Refunds];++}++impl ConnectorSpecifications for Razorpay {+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {+ Some(&*RAZORPAY_CONNECTOR_INFO)+ }++ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {+ Some(&*RAZORPAY_SUPPORTED_PAYMENT_METHODS)+ }++ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {+ Some(&*RAZORPAY_SUPPORTED_WEBHOOK_FLOWS)+ }+}diff --git a/crates/hyperswitch_connectors/src/connectors/volt.rs b/crates/hyperswitch_connectors/src/connectors/volt.rsindex 6302188144..cec1194f28 100644--- a/crates/hyperswitch_connectors/src/connectors/volt.rs+++ b/crates/hyperswitch_connectors/src/connectors/volt.rs@@ -1,6 +1,7 @@pub mod transformers;use api_models::webhooks::IncomingWebhookEvent;+use common_enums::enums;use common_utils::{crypto,errors::CustomResult,@@ -21,7 +22,10 @@ use hyperswitch_domain_models::{PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,RefundsData, SetupMandateRequestData,},- router_response_types::{PaymentsResponseData, RefundsResponseData},+ router_response_types::{+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,+ SupportedPaymentMethods, SupportedPaymentMethodsExt,+ },types::{PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,RefreshTokenRouterData, RefundsRouterData,@@ -38,6 +42,7 @@ use hyperswitch_interfaces::{types::{self, PaymentsAuthorizeType, RefreshTokenType, Response},webhooks,};+use lazy_static::lazy_static;use masking::{ExposeInterface, Mask, PeekInterface};use transformers as volt;@@ -731,4 +736,46 @@ impl webhooks::IncomingWebhook for Volt {}}-impl ConnectorSpecifications for Volt {}+lazy_static! {+ static ref VOLT_SUPPORTED_PAYMENT_METHODS: SupportedPaymentMethods = {+ let supported_capture_methods = vec![enums::CaptureMethod::Automatic];++ let mut volt_supported_payment_methods = SupportedPaymentMethods::new();+ volt_supported_payment_methods.add(+ enums::PaymentMethod::BankRedirect,+ enums::PaymentMethodType::OpenBankingUk,+ PaymentMethodDetails{+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods,+ specific_features: None,+ },+ );++ volt_supported_payment_methods+ };++ static ref VOLT_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {+ display_name: "VOLT",+ description:+ "Volt is a payment gateway operating in China, specializing in facilitating local bank transfers",+ connector_type: enums::PaymentConnectorCategory::PaymentGateway,+ };++ static ref VOLT_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = Vec::new();++}++impl ConnectorSpecifications for Volt {+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {+ Some(&*VOLT_CONNECTOR_INFO)+ }++ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {+ Some(&*VOLT_SUPPORTED_PAYMENT_METHODS)+ }++ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {+ Some(&*VOLT_SUPPORTED_WEBHOOK_FLOWS)+ }+}diff --git a/loadtest/config/development.toml b/loadtest/config/development.tomlindex 6766d7cb7e..7c999401f6 100644--- a/loadtest/config/development.toml+++ b/loadtest/config/development.toml@@ -271,6 +271,20 @@ cards = ["zsl",]+[pm_filters.dlocal]+credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}+debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"}++[pm_filters.mollie]+credit = { not_available_flows = { capture_method = "manual" } }+debit = { not_available_flows = { capture_method = "manual" } }+eps = { country = "AT", currency = "EUR" }+ideal = { country = "NL", currency = "EUR" }+przelewy24 = { country = "PL", currency = "PLN,EUR" }++[pm_filters.mifinity]+mifinity = { country = "BR,CN,SG,MY,DE,CH,DK,GB,ES,AD,GI,FI,FR,GR,HR,IT,JP,MX,AR,CO,CL,PE,VE,UY,PY,BO,EC,GT,HN,SV,NI,CR,PA,DO,CU,PR,NL,NO,PL,PT,SE,RU,TR,TW,HK,MO,AX,AL,DZ,AS,AO,AI,AG,AM,AW,AU,AT,AZ,BS,BH,BD,BB,BE,BZ,BJ,BM,BT,BQ,BA,BW,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,CX,CC,KM,CG,CK,CI,CW,CY,CZ,DJ,DM,EG,GQ,ER,EE,ET,FK,FO,FJ,GF,PF,TF,GA,GM,GE,GH,GL,GD,GP,GU,GG,GN,GW,GY,HT,HM,VA,IS,IN,ID,IE,IM,IL,JE,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LI,LT,LU,MK,MG,MW,MV,ML,MT,MH,MQ,MR,MU,YT,FM,MD,MC,MN,ME,MS,MA,MZ,NA,NR,NP,NC,NZ,NE,NG,NU,NF,MP,OM,PK,PW,PS,PG,PH,PN,QA,RE,RO,RW,BL,SH,KN,LC,MF,PM,VC,WS,SM,ST,SA,SN,RS,SC,SL,SX,SK,SI,SB,SO,ZA,GS,KR,LK,SR,SJ,SZ,TH,TL,TG,TK,TO,TT,TN,TM,TC,TV,UG,UA,AE,UZ,VU,VN,VG,VI,WF,EH,ZM", currency = "AUD,CAD,CHF,CNY,CZK,DKK,EUR,GBP,INR,JPY,NOK,NZD,PLN,RUB,SEK,ZAR,USD,EGP,UYU,UZS" }+[pm_filters.volt]open_banking_uk = {country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL"}