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): [ZSL] handle partial payments in Local Bank Transfer (#4777)
AkshayaFoigere410eba6ed48
diff --git a/config/deployments/production.toml b/config/deployments/production.tomlindex 39c0b21315..fc284594c0 100644--- a/config/deployments/production.toml+++ b/config/deployments/production.toml@@ -91,7 +91,7 @@ worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"zen.base_url = "https://api.zen.com/"zen.secondary_base_url = "https://secure.zen.com/"-zsl.base_url = "https://api.sitoffalb.net/"+zsl.base_url = "https://api.prodoffalb.net/"threedsecureio.base_url = "https://service.3dsecure.io"netcetera.base_url = "https://{{merchant_endpoint_prefix}}.3ds-server.prev.netcetera-cloud-payment.ch"diff --git a/crates/router/src/connector/zsl/transformers.rs b/crates/router/src/connector/zsl/transformers.rsindex ce1ae41fa4..a9c80d39b7 100644--- a/crates/router/src/connector/zsl/transformers.rs+++ b/crates/router/src/connector/zsl/transformers.rs@@ -406,16 +406,45 @@ impl types::transformers::ForeignFrom<String> for api_models::webhooks::Incoming}}-impl<F, T> TryFrom<types::ResponseRouterData<F, ZslWebhookResponse, T, types::PaymentsResponseData>>- for types::RouterData<F, T, types::PaymentsResponseData>+impl<F>+ TryFrom<+ types::ResponseRouterData<+ F,+ ZslWebhookResponse,+ types::PaymentsSyncData,+ types::PaymentsResponseData,+ >,+ > for types::RouterData<F, types::PaymentsSyncData, types::PaymentsResponseData>{type Error = error_stack::Report<errors::ConnectorError>;fn try_from(- item: types::ResponseRouterData<F, ZslWebhookResponse, T, types::PaymentsResponseData>,+ item: types::ResponseRouterData<+ F,+ ZslWebhookResponse,+ types::PaymentsSyncData,+ types::PaymentsResponseData,+ >,) -> Result<Self, Self::Error> {+ let paid_amount = item+ .response+ .paid_amt+ .parse::<i64>()+ .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let txn_amount = item+ .response+ .txn_amt+ .parse::<i64>()+ .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let status = if txn_amount > paid_amount {+ enums::AttemptStatus::PartialCharged+ } else {+ enums::AttemptStatus::Charged+ };+if item.response.status == "0" {Ok(Self {- status: enums::AttemptStatus::Charged,+ status,+ amount_captured: Some(paid_amount),response: Ok(types::PaymentsResponseData::TransactionResponse {resource_id: types::ResponseId::ConnectorTransactionId(item.response.mer_ref.clone(),