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
fix(connector): [redsys] psync transaction type mapping (#7628)
AkshayaFoiger9159823d963c
diff --git a/crates/hyperswitch_connectors/src/connectors/redsys.rs b/crates/hyperswitch_connectors/src/connectors/redsys.rsindex 72ac6e2460..cc58d6fd18 100644--- a/crates/hyperswitch_connectors/src/connectors/redsys.rs+++ b/crates/hyperswitch_connectors/src/connectors/redsys.rs@@ -888,8 +888,7 @@ static REDSYS_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {connector_type: common_enums::PaymentConnectorCategory::PaymentGateway,};-static REDSYS_SUPPORTED_WEBHOOK_FLOWS: LazyLock<Vec<common_enums::EventClass>> =- LazyLock::new(Vec::new);+static REDSYS_SUPPORTED_WEBHOOK_FLOWS: [common_enums::EventClass; 0] = [];impl ConnectorSpecifications for Redsys {fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {@@ -901,6 +900,6 @@ impl ConnectorSpecifications for Redsys {}fn get_supported_webhook_flows(&self) -> Option<&'static [common_enums::EventClass]> {- Some(&*REDSYS_SUPPORTED_WEBHOOK_FLOWS)+ Some(&REDSYS_SUPPORTED_WEBHOOK_FLOWS)}}diff --git a/crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs b/crates/hyperswitch_connectors/src/connectors/redsys/transformers.rsindex 8676eec6d2..ff391b0306 100644--- a/crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs@@ -96,6 +96,7 @@ pub struct EmvThreedsData {browser_screen_height: Option<String>,browser_screen_width: Option<String>,browser_t_z: Option<String>,+ browser_i_p: Option<Secret<String, common_utils::pii::IpAddress>>,three_d_s_server_trans_i_d: Option<String>,notification_u_r_l: Option<String>,three_d_s_comp_ind: Option<ThreeDSCompInd>,@@ -144,6 +145,7 @@ impl EmvThreedsData {browser_screen_height: None,browser_screen_width: None,browser_t_z: None,+ browser_i_p: None,three_d_s_server_trans_i_d: None,notification_u_r_l: None,three_d_s_comp_ind: None,@@ -163,6 +165,7 @@ impl EmvThreedsData {self.browser_screen_height = Some(browser_info.get_screen_height()?.to_string());self.browser_screen_width = Some(browser_info.get_screen_width()?.to_string());self.browser_t_z = Some(browser_info.get_time_zone()?.to_string());+ self.browser_i_p = Some(browser_info.get_ip_address()?);Ok(self)}@@ -1563,6 +1566,7 @@ fn get_transaction_type(| enums::AttemptStatus::AuthenticationSuccessful| enums::AttemptStatus::Started| enums::AttemptStatus::Authorizing+ | enums::AttemptStatus::Authorized| enums::AttemptStatus::DeviceDataCollectionPending => match capture_method {Some(enums::CaptureMethod::Automatic) | None => {Ok(transaction_type::PAYMENT.to_owned())@@ -1576,7 +1580,7 @@ fn get_transaction_type(enums::AttemptStatus::VoidInitiated => Ok(transaction_type::CANCELLATION.to_owned()),enums::AttemptStatus::PartialChargedAndChargeable| enums::AttemptStatus::CaptureInitiated => Ok(transaction_type::CONFIRMATION.to_owned()),- enums::AttemptStatus::Authorized | enums::AttemptStatus::Pending => match capture_method {+ enums::AttemptStatus::Pending => match capture_method {Some(enums::CaptureMethod::Automatic) | None => {Ok(transaction_type::PAYMENT.to_owned())}