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): adyen - propagate connector mandate details in incoming webhooks (#6720)
Kashifbea4b9e7f430
diff --git a/crates/router/src/connector/adyen.rs b/crates/router/src/connector/adyen.rsindex f3b7414a92..57b80f5815 100644--- a/crates/router/src/connector/adyen.rs+++ b/crates/router/src/connector/adyen.rs@@ -1908,6 +1908,27 @@ impl api::IncomingWebhook for Adyen {updated_at: notif.event_date,})}++ fn get_mandate_details(+ &self,+ request: &api::IncomingWebhookRequestDetails<'_>,+ ) -> CustomResult<+ Option<hyperswitch_domain_models::router_flow_types::ConnectorMandateDetails>,+ errors::ConnectorError,+ > {+ let notif = get_webhook_object_from_body(request.body)+ .change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;+ let mandate_reference =+ notif+ .additional_data+ .recurring_detail_reference+ .map(|mandate_id| {+ hyperswitch_domain_models::router_flow_types::ConnectorMandateDetails {+ connector_mandate_id: mandate_id.clone(),+ }+ });+ Ok(mandate_reference)+ }}impl api::Dispute for Adyen {}diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rsindex 7daee6e73d..cae5f508a2 100644--- a/crates/router/src/connector/adyen/transformers.rs+++ b/crates/router/src/connector/adyen/transformers.rs@@ -4261,6 +4261,9 @@ pub struct AdyenAdditionalDataWH {pub chargeback_reason_code: Option<String>,#[serde(default, with = "common_utils::custom_serde::iso8601::option")]pub defense_period_ends_at: Option<PrimitiveDateTime>,+ /// Enable recurring details in dashboard to receive this ID, https://docs.adyen.com/online-payments/tokenization/create-and-use-tokens#test-and-go-live+ #[serde(rename = "recurring.recurringDetailReference")]+ pub recurring_detail_reference: Option<Secret<String>>,}#[derive(Debug, Deserialize)]