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): [Revolv3] Integrate Card flows (#11319)

Akshaya Shankardbe505f23e33
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 6c44e4d8db..e7e540d63b 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -15045,6 +15045,7 @@
"razorpay",
"recurly",
"redsys",
+ "revolv3",
"santander",
"shift4",
"silverflow",
@@ -36630,6 +36631,7 @@
"razorpay",
"recurly",
"redsys",
+ "revolv3",
"riskified",
"santander",
"shift4",
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index f5211cf011..48f1d23425 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -10593,6 +10593,7 @@
"razorpay",
"recurly",
"redsys",
+ "revolv3",
"santander",
"shift4",
"silverflow",
@@ -27622,6 +27623,7 @@
"razorpay",
"recurly",
"redsys",
+ "revolv3",
"riskified",
"santander",
"shift4",
diff --git a/config/config.example.toml b/config/config.example.toml
index 27d4917e54..753516a74a 100644
--- a/config/config.example.toml
+++ b/config/config.example.toml
@@ -312,6 +312,7 @@ rapyd.base_url = "https://sandboxapi.rapyd.net"
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"
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/"
@@ -1301,7 +1302,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 = "paytm, phonepe, hyperpg" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # 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 e2af3277a9..e5e74d07bd 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 = "paytm, phonepe, hyperpg" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # 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 41dd80d937..e0dc3bd957 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -136,6 +136,7 @@ rapyd.base_url = "https://sandboxapi.rapyd.net"
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"
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/"
@@ -980,7 +981,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "paytm, phonepe, hyperpg" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # 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 c168e15cba..de98a589e5 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -139,6 +139,7 @@ rapyd.base_url = "https://api.rapyd.net"
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"
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/"
@@ -985,7 +986,7 @@ click_to_pay = {connector_list = "adyen, cybersource, trustpay"}
connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "paytm, phonepe, hyperpg" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # 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 b3bb5bbeaf..0467fa9e7f 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -139,6 +139,7 @@ rapyd.base_url = "https://sandboxapi.rapyd.net"
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"
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/"
@@ -995,7 +996,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "paytm, phonepe, hyperpg" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # 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 c17c928c2d..5aff9633c8 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -342,6 +342,7 @@ rapyd.base_url = "https://sandboxapi.rapyd.net"
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"
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/"
@@ -1431,7 +1432,7 @@ enabled = "true"
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000"
connection_timeout = 10
-ucs_only_connectors = "paytm, phonepe, hyperpg" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # 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 70a4667cb3..fd2ec6b568 100644
--- a/config/docker_compose.toml
+++ b/config/docker_compose.toml
@@ -243,6 +243,7 @@ rapyd.base_url = "https://sandboxapi.rapyd.net"
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"
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/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rs
index e78eb586bd..98296f44c9 100644
--- a/crates/common_enums/src/connector_enums.rs
+++ b/crates/common_enums/src/connector_enums.rs
@@ -164,6 +164,7 @@ pub enum Connector {
Razorpay,
Recurly,
Redsys,
+ Revolv3,
Santander,
Shift4,
Silverflow,
@@ -371,6 +372,7 @@ impl Connector {
| Self::Rapyd
| Self::Recurly
| Self::Redsys
+ | Self::Revolv3
| Self::Santander
| Self::Shift4
| Self::Silverflow
diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs
index 2d1f9bd931..bd06b698ee 100644
--- a/crates/connector_configs/src/connector.rs
+++ b/crates/connector_configs/src/connector.rs
@@ -352,6 +352,7 @@ pub struct ConnectorConfig {
pub riskified: Option<ConnectorTomlConfig>,
pub rapyd: Option<ConnectorTomlConfig>,
pub redsys: Option<ConnectorTomlConfig>,
+ pub revolv3: Option<ConnectorTomlConfig>,
pub santander: Option<ConnectorTomlConfig>,
pub shift4: Option<ConnectorTomlConfig>,
pub sift: Option<ConnectorTomlConfig>,
@@ -590,6 +591,7 @@ impl ConnectorConfig {
Connector::Rapyd => Ok(connector_data.rapyd),
Connector::Recurly => Ok(connector_data.recurly),
Connector::Redsys => Ok(connector_data.redsys),
+ Connector::Revolv3 => Ok(connector_data.revolv3),
Connector::Riskified => Ok(connector_data.riskified),
Connector::Santander => Ok(connector_data.santander),
Connector::Shift4 => Ok(connector_data.shift4),
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index 64765907eb..5212a7b661 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -8138,3 +8138,43 @@ options=["Connector"]
[truelayer.connector_auth.BodyKey]
api_key = "Client ID"
key1 = "Client Secret"
+
+[revolv3]
+[[revolv3.credit]]
+payment_method_type = "Mastercard"
+[[revolv3.credit]]
+payment_method_type = "Visa"
+[[revolv3.credit]]
+payment_method_type = "Interac"
+[[revolv3.credit]]
+payment_method_type = "AmericanExpress"
+[[revolv3.credit]]
+payment_method_type = "JCB"
+[[revolv3.credit]]
+payment_method_type = "DinersClub"
+[[revolv3.credit]]
+payment_method_type = "Discover"
+[[revolv3.credit]]
+payment_method_type = "CartesBancaires"
+[[revolv3.credit]]
+payment_method_type = "UnionPay"
+[[revolv3.debit]]
+payment_method_type = "Mastercard"
+[[revolv3.debit]]
+payment_method_type = "Visa"
+[[revolv3.debit]]
+payment_method_type = "Interac"
+[[revolv3.debit]]
+payment_method_type = "AmericanExpress"
+[[revolv3.debit]]
+payment_method_type = "JCB"
+[[revolv3.debit]]
+payment_method_type = "DinersClub"
+[[revolv3.debit]]
+payment_method_type = "Discover"
+[[revolv3.debit]]
+payment_method_type = "CartesBancaires"
+[[revolv3.debit]]
+payment_method_type = "UnionPay"
+[revolv3.connector_auth.HeaderKey]
+api_key = "Static Tokens"
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index 8e4b6af283..136984817c 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -7018,3 +7018,45 @@ options=["Connector"]
[truelayer.connector_auth.BodyKey]
api_key = "Client ID"
key1 = "Client Secret"
+
+
+[revolv3]
+[[revolv3.credit]]
+payment_method_type = "Mastercard"
+[[revolv3.credit]]
+payment_method_type = "Visa"
+[[revolv3.credit]]
+payment_method_type = "Interac"
+[[revolv3.credit]]
+payment_method_type = "AmericanExpress"
+[[revolv3.credit]]
+payment_method_type = "JCB"
+[[revolv3.credit]]
+payment_method_type = "DinersClub"
+[[revolv3.credit]]
+payment_method_type = "Discover"
+[[revolv3.credit]]
+payment_method_type = "CartesBancaires"
+[[revolv3.credit]]
+payment_method_type = "UnionPay"
+[[revolv3.debit]]
+payment_method_type = "Mastercard"
+[[revolv3.debit]]
+payment_method_type = "Visa"
+[[revolv3.debit]]
+payment_method_type = "Interac"
+[[revolv3.debit]]
+payment_method_type = "AmericanExpress"
+[[revolv3.debit]]
+payment_method_type = "JCB"
+[[revolv3.debit]]
+payment_method_type = "DinersClub"
+[[revolv3.debit]]
+payment_method_type = "Discover"
+[[revolv3.debit]]
+payment_method_type = "CartesBancaires"
+[[revolv3.debit]]
+payment_method_type = "UnionPay"
+[revolv3.connector_auth.HeaderKey]
+api_key = "Static Tokens"
+
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index 58abb05aac..69d94d1cb2 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -8109,3 +8109,45 @@ options=["Connector"]
[truelayer.connector_auth.BodyKey]
api_key = "Client ID"
key1 = "Client Secret"
+
+
+[revolv3]
+[[revolv3.credit]]
+payment_method_type = "Mastercard"
+[[revolv3.credit]]
+payment_method_type = "Visa"
+[[revolv3.credit]]
+payment_method_type = "Interac"
+[[revolv3.credit]]
+payment_method_type = "AmericanExpress"
+[[revolv3.credit]]
+payment_method_type = "JCB"
+[[revolv3.credit]]
+payment_method_type = "DinersClub"
+[[revolv3.credit]]
+payment_method_type = "Discover"
+[[revolv3.credit]]
+payment_method_type = "CartesBancaires"
+[[revolv3.credit]]
+payment_method_type = "UnionPay"
+[[revolv3.debit]]
+payment_method_type = "Mastercard"
+[[revolv3.debit]]
+payment_method_type = "Visa"
+[[revolv3.debit]]
+payment_method_type = "Interac"
+[[revolv3.debit]]
+payment_method_type = "AmericanExpress"
+[[revolv3.debit]]
+payment_method_type = "JCB"
+[[revolv3.debit]]
+payment_method_type = "DinersClub"
+[[revolv3.debit]]
+payment_method_type = "Discover"
+[[revolv3.debit]]
+payment_method_type = "CartesBancaires"
+[[revolv3.debit]]
+payment_method_type = "UnionPay"
+[revolv3.connector_auth.HeaderKey]
+api_key = "Static Tokens"
+
diff --git a/crates/euclid/src/enums.rs b/crates/euclid/src/enums.rs
index c15c84c862..370c95f06d 100644
--- a/crates/euclid/src/enums.rs
+++ b/crates/euclid/src/enums.rs
@@ -319,6 +319,7 @@ pub enum RoutableConnectors {
Razorpay,
Recurly,
Redsys,
+ Revolv3,
Riskified,
Santander,
Shift4,
@@ -499,6 +500,7 @@ impl TryFrom<Connector> for RoutableConnectors {
Connector::Hipay => Ok(Self::Hipay),
Connector::Inespay => Ok(Self::Inespay),
Connector::Redsys => Ok(Self::Redsys),
+ Connector::Revolv3 => Ok(Self::Revolv3),
Connector::Paytm => Ok(Self::Paytm),
Connector::Phonepe => Ok(Self::Phonepe),
Connector::Payjustnow => Ok(Self::Payjustnow),
@@ -625,6 +627,7 @@ impl From<RoutableConnectors> for Connector {
RoutableConnectors::Razorpay => Self::Razorpay,
RoutableConnectors::Recurly => Self::Recurly,
RoutableConnectors::Redsys => Self::Redsys,
+ RoutableConnectors::Revolv3 => Self::Revolv3,
RoutableConnectors::Riskified => Self::Riskified,
RoutableConnectors::Santander => Self::Santander,
RoutableConnectors::Shift4 => Self::Shift4,
diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs
index c4164099c5..6c5d3274d7 100644
--- a/crates/hyperswitch_connectors/src/connectors.rs
+++ b/crates/hyperswitch_connectors/src/connectors.rs
@@ -105,6 +105,7 @@ pub mod rapyd;
pub mod razorpay;
pub mod recurly;
pub mod redsys;
+pub mod revolv3;
pub mod riskified;
pub mod santander;
pub mod shift4;
@@ -168,12 +169,13 @@ pub use self::{
payload::Payload, payme::Payme, 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, 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, trustpay::Trustpay, trustpayments::Trustpayments,
- tsys::Tsys, unified_authentication_service::UnifiedAuthenticationService, vgs::Vgs, volt::Volt,
+ 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, 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/revolv3.rs b/crates/hyperswitch_connectors/src/connectors/revolv3.rs
new file mode 100644
index 0000000000..e1076dcff9
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/revolv3.rs
@@ -0,0 +1,191 @@
+pub mod transformers;
+use std::sync::LazyLock;
+
+use common_utils::errors::CustomResult;
+use hyperswitch_domain_models::{
+ router_data::{AccessToken, ConnectorAuthType, ErrorResponse},
+ 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,
+ },
+};
+use hyperswitch_interfaces::{
+ api, configs::Connectors, errors, events::connector_api_logs::ConnectorEvent, types::Response,
+ webhooks,
+};
+
+#[derive(Clone)]
+pub struct Revolv3 {}
+
+impl Revolv3 {
+ pub fn new() -> &'static Self {
+ &Self {}
+ }
+}
+
+impl api::Payment for Revolv3 {}
+impl api::PaymentSession for Revolv3 {}
+impl api::ConnectorAccessToken for Revolv3 {}
+impl api::MandateSetup for Revolv3 {}
+impl api::PaymentAuthorize for Revolv3 {}
+impl api::PaymentSync for Revolv3 {}
+impl api::PaymentCapture for Revolv3 {}
+impl api::PaymentVoid for Revolv3 {}
+impl api::Refund for Revolv3 {}
+impl api::RefundExecute for Revolv3 {}
+impl api::RefundSync for Revolv3 {}
+impl api::PaymentToken for Revolv3 {}
+
+impl api::ConnectorCommon for Revolv3 {
+ fn id(&self) -> &'static str {
+ "revolv3"
+ }
+
+ fn get_currency_unit(&self) -> api::CurrencyUnit {
+ api::CurrencyUnit::Base
+ }
+
+ fn common_get_content_type(&self) -> &'static str {
+ "application/json"
+ }
+
+ fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
+ connectors.revolv3.base_url.as_ref()
+ }
+
+ fn get_auth_header(
+ &self,
+ _auth_type: &ConnectorAuthType,
+ ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
+ Ok(Vec::new())
+ }
+
+ fn build_error_response(
+ &self,
+ _res: Response,
+ _event_builder: Option<&mut ConnectorEvent>,
+ ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
+ Err(errors::ConnectorError::NotImplemented("Revolv3".to_string()).into())
+ }
+}
+
+impl api::ConnectorValidation for Revolv3 {}
+impl api::ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Revolv3 {}
+impl api::ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Revolv3 {}
+impl api::ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
+ for Revolv3
+{
+}
+impl api::ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Revolv3 {}
+impl api::ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Revolv3 {}
+impl api::ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Revolv3 {}
+impl api::ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Revolv3 {}
+impl api::ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Revolv3 {}
+impl api::ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Revolv3 {}
+impl
+ api::ConnectorIntegration<
+ PaymentMethodToken,
+ PaymentMethodTokenizationData,
+ PaymentsResponseData,
+ > for Revolv3
+{
+}
+
+#[async_trait::async_trait]
+impl webhooks::IncomingWebhook for Revolv3 {
+ fn get_webhook_object_reference_id(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
+ Err((errors::ConnectorError::WebhooksNotImplemented).into())
+ }
+
+ fn get_webhook_event_type(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ _context: Option<&webhooks::WebhookContext>,
+ ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
+ Err((errors::ConnectorError::WebhooksNotImplemented).into())
+ }
+
+ fn get_webhook_resource_object(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
+ Err((errors::ConnectorError::WebhooksNotImplemented).into())
+ }
+}
+
+static REVOLV3_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = LazyLock::new(|| {
+ let default_capture_methods = vec![
+ common_enums::CaptureMethod::Automatic,
+ common_enums::CaptureMethod::Manual,
+ common_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,
+ ];
+
+ let mut revolv3_supported_payment_methods = SupportedPaymentMethods::new();
+
+ revolv3_supported_payment_methods.add(
+ common_enums::PaymentMethod::Card,
+ common_enums::PaymentMethodType::Credit,
+ PaymentMethodDetails {
+ mandates: common_enums::FeatureStatus::Supported,
+ refunds: common_enums::FeatureStatus::Supported,
+ supported_capture_methods: default_capture_methods.clone(),
+ specific_features: Some(
+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card(
+ api_models::feature_matrix::CardSpecificFeatures {
+ three_ds: common_enums::FeatureStatus::NotSupported,
+ no_three_ds: common_enums::FeatureStatus::Supported,
+ supported_card_networks: supported_card_network.clone(),
+ },
+ ),
+ ),
+ },
+ );
+
+ revolv3_supported_payment_methods
+});
+
+static REVOLV3_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
+ display_name: "Revolv3",
+ description: "Revolv3 is a payment platform that enables secure card processing and alternative payment solutions for merchants through a unified API.",
+ connector_type: common_enums::HyperswitchConnectorCategory::PaymentGateway,
+ integration_status: common_enums::ConnectorIntegrationStatus::Beta,
+};
+
+static REVOLV3_SUPPORTED_WEBHOOK_FLOWS: [common_enums::EventClass; 0] = [];
+
+impl api::ConnectorSpecifications for Revolv3 {
+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
+ Some(&REVOLV3_CONNECTOR_INFO)
+ }
+
+ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
+ Some(&*REVOLV3_SUPPORTED_PAYMENT_METHODS)
+ }
+
+ fn get_supported_webhook_flows(&self) -> Option<&'static [common_enums::EventClass]> {
+ Some(&REVOLV3_SUPPORTED_WEBHOOK_FLOWS)
+ }
+}
diff --git a/crates/hyperswitch_connectors/src/connectors/revolv3/transformers.rs b/crates/hyperswitch_connectors/src/connectors/revolv3/transformers.rs
new file mode 100644
index 0000000000..c049b1bc67
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/revolv3/transformers.rs
@@ -0,0 +1,18 @@
+use hyperswitch_domain_models::router_data::ConnectorAuthType;
+use hyperswitch_interfaces::errors;
+
+pub struct Revolv3AuthType {
+ pub api_key: masking::Secret<String>,
+}
+
+impl TryFrom<&ConnectorAuthType> for Revolv3AuthType {
+ type Error = error_stack::Report<errors::ConnectorError>;
+ fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+ match auth_type {
+ ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
+ api_key: api_key.to_owned(),
+ }),
+ _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
+ }
+ }
+}
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index 3dfcfcbca3..7f1359f00c 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -283,6 +283,7 @@ default_imp_for_authorize_session_token!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -439,6 +440,7 @@ default_imp_for_payment_settlement_split_create!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -595,6 +597,7 @@ default_imp_for_calculate_tax!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -709,6 +712,7 @@ default_imp_for_session_update!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -865,6 +869,7 @@ default_imp_for_post_session_tokens!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1017,6 +1022,7 @@ default_imp_for_create_order!(
connectors::Rapyd,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1173,6 +1179,7 @@ default_imp_for_update_metadata!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Shift4,
connectors::Sift,
connectors::Silverflow,
@@ -1338,6 +1345,7 @@ default_imp_for_cancel_post_capture!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -1432,6 +1440,7 @@ macro_rules! default_imp_for_complete_authorize {
}
default_imp_for_complete_authorize!(
+ connectors::Revolv3,
connectors::Worldpaymodular,
connectors::Silverflow,
connectors::Vgs,
@@ -1666,6 +1675,7 @@ default_imp_for_incremental_authorization!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1777,6 +1787,7 @@ default_imp_for_extend_authorization!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -1966,6 +1977,7 @@ default_imp_for_create_customer!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2109,6 +2121,7 @@ default_imp_for_connector_redirect_response!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2154,6 +2167,7 @@ macro_rules! default_imp_for_pre_authenticate_steps{
}
default_imp_for_pre_authenticate_steps!(
+ connectors::Revolv3,
connectors::Aci,
connectors::Adyen,
connectors::Adyenplatform,
@@ -2305,6 +2319,7 @@ macro_rules! default_imp_for_authenticate_steps{
}
default_imp_for_authenticate_steps!(
+ connectors::Revolv3,
connectors::Aci,
connectors::Adyen,
connectors::Adyenplatform,
@@ -2561,6 +2576,7 @@ default_imp_for_post_authenticate_steps!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2614,6 +2630,7 @@ macro_rules! default_imp_for_pre_processing_steps{
}
default_imp_for_pre_processing_steps!(
+ connectors::Revolv3,
connectors::Zift,
connectors::Trustpayments,
connectors::Silverflow,
@@ -2860,6 +2877,7 @@ default_imp_for_post_processing_steps!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3018,6 +3036,7 @@ default_imp_for_approve!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3176,6 +3195,7 @@ default_imp_for_reject!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3333,6 +3353,7 @@ default_imp_for_webhook_source_verification!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3490,6 +3511,7 @@ default_imp_for_accept_dispute!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3645,6 +3667,7 @@ default_imp_for_submit_evidence!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3799,6 +3822,7 @@ default_imp_for_defend_dispute!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3957,6 +3981,7 @@ default_imp_for_fetch_disputes!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4114,6 +4139,7 @@ default_imp_for_dispute_sync!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4278,6 +4304,7 @@ default_imp_for_file_upload!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4418,6 +4445,7 @@ default_imp_for_payouts!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4567,6 +4595,7 @@ default_imp_for_payouts_create!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4721,6 +4750,7 @@ default_imp_for_payouts_retrieve!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4876,6 +4906,7 @@ default_imp_for_payouts_eligibility!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5026,6 +5057,7 @@ default_imp_for_payouts_fulfill!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5178,6 +5210,7 @@ default_imp_for_payouts_cancel!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5332,6 +5365,7 @@ default_imp_for_payouts_quote!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5489,6 +5523,7 @@ default_imp_for_payouts_recipient!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5646,6 +5681,7 @@ default_imp_for_payouts_recipient_account!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5805,6 +5841,7 @@ default_imp_for_frm_sale!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -5962,6 +5999,7 @@ default_imp_for_frm_checkout!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6119,6 +6157,7 @@ default_imp_for_frm_transaction!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6277,6 +6316,7 @@ default_imp_for_frm_fulfillment!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6435,6 +6475,7 @@ default_imp_for_frm_record_return!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -6587,6 +6628,7 @@ default_imp_for_revoking_mandates!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -6743,6 +6785,7 @@ default_imp_for_uas_pre_authentication!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -6898,6 +6941,7 @@ default_imp_for_uas_webhook!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7053,6 +7097,7 @@ default_imp_for_uas_post_authentication!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7209,6 +7254,7 @@ default_imp_for_uas_authentication_confirmation!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7356,6 +7402,7 @@ default_imp_for_connector_request_id!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7507,6 +7554,7 @@ default_imp_for_fraud_check!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -7685,6 +7733,7 @@ default_imp_for_connector_authentication!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7839,6 +7888,7 @@ default_imp_for_uas_authentication!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -7988,6 +8038,7 @@ default_imp_for_revenue_recovery!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8196,6 +8247,7 @@ default_imp_for_subscriptions!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8354,6 +8406,7 @@ default_imp_for_billing_connector_payment_sync!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8504,6 +8557,7 @@ default_imp_for_revenue_recovery_record_back!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -8661,6 +8715,7 @@ default_imp_for_billing_connector_invoice_sync!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -8812,6 +8867,7 @@ default_imp_for_external_vault!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -8968,6 +9024,7 @@ default_imp_for_external_vault_insert!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9121,6 +9178,7 @@ default_imp_for_gift_card_balance_check!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -9279,6 +9337,7 @@ default_imp_for_external_vault_retrieve!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9435,6 +9494,7 @@ default_imp_for_external_vault_delete!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9592,6 +9652,7 @@ default_imp_for_external_vault_create!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Signifyd,
@@ -9749,6 +9810,7 @@ default_imp_for_connector_authentication_token!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Sift,
@@ -9905,6 +9967,7 @@ default_imp_for_external_vault_proxy_payments_create!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -10064,6 +10127,7 @@ default_imp_for_connector_webhook_register!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -10921,6 +10985,7 @@ default_impl_connector_access_token!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Shift4,
connectors::Silverflow,
connectors::Square,
diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
index 4e5215d11c..3474ac893c 100644
--- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
@@ -424,6 +424,7 @@ default_imp_for_new_connector_integration_payment!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -582,6 +583,7 @@ default_imp_for_new_connector_integration_refund!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -729,6 +731,7 @@ default_imp_for_new_connector_integration_connector_authentication_token!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -881,6 +884,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1039,6 +1043,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1197,6 +1202,7 @@ default_imp_for_new_connector_integration_fetch_disputes!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1356,6 +1362,7 @@ default_imp_for_new_connector_integration_dispute_sync!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1515,6 +1522,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1672,6 +1680,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -1840,6 +1849,7 @@ default_imp_for_new_connector_integration_file_upload!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2000,6 +2010,7 @@ default_imp_for_new_connector_integration_payouts_create!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2160,6 +2171,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2320,6 +2332,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2480,6 +2493,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2640,6 +2654,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2800,6 +2815,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -2960,6 +2976,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3120,6 +3137,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3278,6 +3296,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3438,6 +3457,7 @@ default_imp_for_new_connector_integration_frm_sale!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3598,6 +3618,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3758,6 +3779,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -3918,6 +3940,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4078,6 +4101,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4234,6 +4258,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4361,6 +4386,7 @@ default_imp_for_new_connector_integration_frm!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4516,6 +4542,7 @@ default_imp_for_new_connector_integration_connector_authentication!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4663,6 +4690,7 @@ default_imp_for_new_connector_integration_revenue_recovery!(
connectors::Rapyd,
connectors::Razorpay,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -4845,6 +4873,7 @@ default_imp_for_new_connector_integration_external_vault!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5002,6 +5031,7 @@ default_imp_for_new_connector_integration_external_vault_proxy!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
@@ -5162,6 +5192,7 @@ default_imp_for_new_connector_integration_webhook_register!(
connectors::Razorpay,
connectors::Recurly,
connectors::Redsys,
+ connectors::Revolv3,
connectors::Riskified,
connectors::Santander,
connectors::Shift4,
diff --git a/crates/hyperswitch_domain_models/src/connector_endpoints.rs b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
index 162785f1df..7069fd6980 100644
--- a/crates/hyperswitch_domain_models/src/connector_endpoints.rs
+++ b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
@@ -120,6 +120,7 @@ pub struct Connectors {
pub razorpay: ConnectorParamsWithKeys,
pub recurly: ConnectorParams,
pub redsys: ConnectorParams,
+ pub revolv3: ConnectorParams,
pub riskified: ConnectorParams,
pub santander: ConnectorParams,
pub shift4: ConnectorParams,
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 fc76a349d0..34e04baf68 100644
--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs
+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
@@ -1607,6 +1607,7 @@ fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {
),
(Connector::Rapyd, fields(vec![], card_with_name(), vec![])),
(Connector::Redsys, fields(vec![], card_basic(), vec![])),
+ (Connector::Revolv3, fields(vec![], vec![], card_with_name())),
(Connector::Shift4, fields(vec![], card_basic(), vec![])),
(Connector::Silverflow, fields(vec![], vec![], card_basic())),
(Connector::Square, fields(vec![], vec![], card_basic())),
diff --git a/crates/router/src/connector.rs b/crates/router/src/connector.rs
index 50dbcb4c5a..ed851a8306 100644
--- a/crates/router/src/connector.rs
+++ b/crates/router/src/connector.rs
@@ -41,13 +41,13 @@ pub use hyperswitch_connectors::connectors::{
peachpayments::Peachpayments, phonepe, phonepe::Phonepe, placetopay, placetopay::Placetopay,
plaid, plaid::Plaid, powertranz, powertranz::Powertranz, prophetpay, prophetpay::Prophetpay,
rapyd, rapyd::Rapyd, razorpay, razorpay::Razorpay, recurly, recurly::Recurly, redsys,
- redsys::Redsys, 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,
- threedsecureio, threedsecureio::Threedsecureio, thunes, thunes::Thunes, tokenex,
- tokenex::Tokenex, tokenio, tokenio::Tokenio, truelayer, truelayer::Truelayer, trustpay,
- trustpay::Trustpay, trustpayments, trustpayments::Trustpayments, tsys, tsys::Tsys,
+ 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, threedsecureio, threedsecureio::Threedsecureio, thunes, thunes::Thunes,
+ tokenex, tokenex::Tokenex, tokenio, tokenio::Tokenio, truelayer, truelayer::Truelayer,
+ trustpay, trustpay::Trustpay, trustpayments, trustpayments::Trustpayments, tsys, tsys::Tsys,
unified_authentication_service, unified_authentication_service::UnifiedAuthenticationService,
vgs, vgs::Vgs, volt, volt::Volt, wellsfargo, wellsfargo::Wellsfargo, wellsfargopayout,
wellsfargopayout::Wellsfargopayout, wise, wise::Wise, worldline, worldline::Worldline,
diff --git a/crates/router/src/core/connector_validation.rs b/crates/router/src/core/connector_validation.rs
index ed16436dc6..2f6f7c8a69 100644
--- a/crates/router/src/core/connector_validation.rs
+++ b/crates/router/src/core/connector_validation.rs
@@ -481,6 +481,10 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> {
redsys::transformers::RedsysAuthType::try_from(self.auth_type)?;
Ok(())
}
+ api_enums::Connector::Revolv3 => {
+ revolv3::transformers::Revolv3AuthType::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/types/api/connector_mapping.rs b/crates/router/src/types/api/connector_mapping.rs
index 1020149496..7d57f7bf6d 100644
--- a/crates/router/src/types/api/connector_mapping.rs
+++ b/crates/router/src/types/api/connector_mapping.rs
@@ -393,6 +393,9 @@ impl ConnectorData {
enums::Connector::Redsys => {
Ok(ConnectorEnum::Old(Box::new(connector::Redsys::new())))
}
+ enums::Connector::Revolv3 => {
+ Ok(ConnectorEnum::Old(Box::new(connector::Revolv3::new())))
+ }
enums::Connector::Santander => {
Ok(ConnectorEnum::Old(Box::new(connector::Santander::new())))
}
diff --git a/crates/router/src/types/api/feature_matrix.rs b/crates/router/src/types/api/feature_matrix.rs
index dc18796f48..9dbc1d0569 100644
--- a/crates/router/src/types/api/feature_matrix.rs
+++ b/crates/router/src/types/api/feature_matrix.rs
@@ -313,6 +313,9 @@ impl FeatureMatrixConnectorData {
enums::Connector::Redsys => {
Ok(ConnectorEnum::Old(Box::new(connector::Redsys::new())))
}
+ enums::Connector::Revolv3 => {
+ Ok(ConnectorEnum::Old(Box::new(connector::Revolv3::new())))
+ }
enums::Connector::Santander => {
Ok(ConnectorEnum::Old(Box::new(connector::Santander::new())))
}
diff --git a/crates/router/src/types/connector_transformers.rs b/crates/router/src/types/connector_transformers.rs
index becc99aa3c..828dc10a04 100644
--- a/crates/router/src/types/connector_transformers.rs
+++ b/crates/router/src/types/connector_transformers.rs
@@ -133,6 +133,7 @@ impl ForeignTryFrom<api_enums::Connector> for euclid::enums::RoutableConnectors
api_enums::Connector::Razorpay => Self::Razorpay,
api_enums::Connector::Recurly => Self::Recurly,
api_enums::Connector::Redsys => Self::Redsys,
+ api_enums::Connector::Revolv3 => Self::Revolv3,
api_enums::Connector::Santander => Self::Santander,
api_enums::Connector::Shift4 => Self::Shift4,
api_enums::Connector::Zift => Self::Zift,
diff --git a/crates/router/tests/connectors/main.rs b/crates/router/tests/connectors/main.rs
index af5d354724..c4bfdf2656 100644
--- a/crates/router/tests/connectors/main.rs
+++ b/crates/router/tests/connectors/main.rs
@@ -109,6 +109,7 @@ mod prophetpay;
mod rapyd;
mod razorpay;
mod redsys;
+mod revolv3;
mod santander;
mod shift4;
mod sift;
diff --git a/crates/router/tests/connectors/revolv3.rs b/crates/router/tests/connectors/revolv3.rs
new file mode 100644
index 0000000000..7f54d82262
--- /dev/null
+++ b/crates/router/tests/connectors/revolv3.rs
@@ -0,0 +1,421 @@
+use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
+use masking::Secret;
+use router::types::{self, api, storage::enums};
+use test_utils::connector_auth;
+
+use crate::utils::{self, ConnectorActions};
+
+#[derive(Clone, Copy)]
+struct Revolv3Test;
+impl ConnectorActions for Revolv3Test {}
+impl utils::Connector for Revolv3Test {
+ fn get_data(&self) -> api::ConnectorData {
+ use router::connector::Revolv3;
+ utils::construct_connector_data_old(
+ Box::new(Revolv3::new()),
+ types::Connector::Plaid,
+ api::GetToken::Connector,
+ None,
+ )
+ }
+
+ fn get_auth_token(&self) -> types::ConnectorAuthType {
+ utils::to_connector_auth_type(
+ connector_auth::ConnectorAuthentication::new()
+ .revolv3
+ .expect("Missing connector authentication configuration")
+ .into(),
+ )
+ }
+
+ fn get_name(&self) -> String {
+ "revolv3".to_string()
+ }
+}
+
+static CONNECTOR: Revolv3Test = Revolv3Test {};
+
+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 677674afa7..4b9c70dc74 100644
--- a/crates/test_utils/src/connector_auth.rs
+++ b/crates/test_utils/src/connector_auth.rs
@@ -117,6 +117,7 @@ pub struct ConnectorAuthentication {
pub razorpay: Option<BodyKey>,
pub recurly: Option<HeaderKey>,
pub redsys: Option<HeaderKey>,
+ pub revolv3: Option<HeaderKey>,
pub santander: Option<BodyKey>,
pub shift4: Option<HeaderKey>,
pub sift: Option<HeaderKey>,
diff --git a/loadtest/config/development.toml b/loadtest/config/development.toml
index fe58257872..8d99088c99 100644
--- a/loadtest/config/development.toml
+++ b/loadtest/config/development.toml
@@ -203,6 +203,7 @@ rapyd.base_url = "https://sandboxapi.rapyd.net"
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"
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 8049b2b51e..4538afcae2 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 fiservemea fiuu flexiti forte getnet gigadat globalpay globepay gocardless gpayments helcim hipay hyperpg hyperswitch_vault hyperwallet hyperwallet iatapay 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 santander shift4 sift silverflow square stax stripe stripebilling taxjar tesouro threedsecureio thunes tokenex tokenio truelayer 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 fiservemea fiuu flexiti forte getnet gigadat globalpay globepay gocardless gpayments helcim hipay hyperpg hyperswitch_vault hyperwallet hyperwallet iatapay 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 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