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

refactor(connector): [Adyen] psync validation check for adyen (#2160)

Swangi Kumari386e820fb85a
diff --git a/crates/router/src/connector/adyen.rs b/crates/router/src/connector/adyen.rs
index 64cba7410e..9065c62395 100644
--- a/crates/router/src/connector/adyen.rs
+++ b/crates/router/src/connector/adyen.rs
@@ -88,6 +88,18 @@ impl ConnectorValidation for Adyen {
),
}
}
+ fn validate_psync_reference_id(
+ &self,
+ data: &types::PaymentsSyncRouterData,
+ ) -> CustomResult<(), errors::ConnectorError> {
+ if data.request.encoded_data.is_some() {
+ return Ok(());
+ }
+ Err(errors::ConnectorError::MissingRequiredField {
+ field_name: "encoded_data",
+ }
+ .into())
+ }
}
impl api::Payment for Adyen {}