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): [Revolv3] Expose processor name in payment response metadata (#14893)
Vani Guptabd21483e4089
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.jsonindex 6a43b297eb..9246c5f98a 100644--- a/api-reference/v1/openapi_spec_v1.json+++ b/api-reference/v1/openapi_spec_v1.json@@ -20288,6 +20288,17 @@"$ref": "#/components/schemas/SantanderData"}}+ },+ {+ "type": "object",+ "required": [+ "revolv3"+ ],+ "properties": {+ "revolv3": {+ "$ref": "#/components/schemas/Revolv3Data"+ }+ }}]},@@ -46266,6 +46277,17 @@"RevolutPayData": {"type": "object"},+ "Revolv3Data": {+ "type": "object",+ "properties": {+ "processor": {+ "type": "string",+ "description": "Name of the downstream processor Revolv3 routed the payment to.",+ "example": "Paysafe",+ "nullable": true+ }+ }+ },"RewardData": {"type": "object","required": [diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.jsonindex 146b1888cb..8173d27170 100644--- a/api-reference/v2/openapi_spec_v2.json+++ b/api-reference/v2/openapi_spec_v2.json@@ -12978,6 +12978,17 @@"$ref": "#/components/schemas/SantanderData"}}+ },+ {+ "type": "object",+ "required": [+ "revolv3"+ ],+ "properties": {+ "revolv3": {+ "$ref": "#/components/schemas/Revolv3Data"+ }+ }}]},@@ -32669,6 +32680,17 @@"RevolutPayData": {"type": "object"},+ "Revolv3Data": {+ "type": "object",+ "properties": {+ "processor": {+ "type": "string",+ "description": "Name of the downstream processor Revolv3 routed the payment to.",+ "example": "Paysafe",+ "nullable": true+ }+ }+ },"RewardData": {"type": "object","required": [diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rsindex 2cd3d226d8..71ce68808a 100644--- a/crates/api_models/src/payments.rs+++ b/crates/api_models/src/payments.rs@@ -10847,6 +10847,16 @@ pub enum WorldpayxmlPaymentPurpose {#[serde(rename_all = "snake_case")]pub enum ConnectorMetadataResponse {Santander(SantanderData),+ Revolv3(Revolv3Data),+}++#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, ToSchema, SmithyModel)]+#[smithy(namespace = "com.hyperswitch.smithy.types")]+pub struct Revolv3Data {+ /// Name of the downstream processor Revolv3 routed the payment to.+ #[schema(value_type = Option<String>, example = "Paysafe")]+ #[serde(skip_serializing_if = "Option::is_none")]+ pub processor: Option<String>,}#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, ToSchema, SmithyModel)]diff --git a/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs b/crates/hyperswitch_domain_models/src/payments/payment_attempt.rsindex 79110ddaeb..7fdc3256d4 100644--- a/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs+++ b/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs@@ -2050,6 +2050,16 @@ impl PaymentAttempt {}).ok().map(api_models::payments::ConnectorMetadataResponse::Santander),+ Connector::Revolv3 => metadata+ .parse_value::<api_models::payments::Revolv3Data>("Revolv3Data")+ .map_err(|_| {+ router_env::logger::warn!(+ "Failed to parse payment_attempt.connector_metadata to Revolv3Data"+ )+ })+ .ok()+ .filter(|revolv3_data| revolv3_data.processor.is_some())+ .map(api_models::payments::ConnectorMetadataResponse::Revolv3),_ => None,})}diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rsindex 23c4a40f7b..47bf0c21bb 100644--- a/crates/openapi/src/openapi.rs+++ b/crates/openapi/src/openapi.rs@@ -635,6 +635,7 @@ Never share your secret api keys. Keep them guarded and secure.api_models::payments::ConnectorMetadataResponse,api_models::payments::SantanderData,api_models::payments::SantanderJourneyName,+ api_models::payments::Revolv3Data,api_models::payments::WorldpayxmlData,api_models::payments::CheckoutData,api_models::payments::WorldpayxmlFundingTransactionType,diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rsindex ff8e509e17..3f8b1e4224 100644--- a/crates/openapi/src/openapi_v2.rs+++ b/crates/openapi/src/openapi_v2.rs@@ -531,6 +531,7 @@ Never share your secret api keys. Keep them guarded and secure.api_models::payments::ConnectorMetadataResponse,api_models::payments::SantanderData,api_models::payments::SantanderJourneyName,+ api_models::payments::Revolv3Data,api_models::payments::WorldpayxmlData,api_models::payments::CheckoutData,api_models::payments::WorldpayxmlFundingTransactionType,