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] Response Handling in case of RefusalResponse (#1877)
AkshayaFoigerc35a5719eb08
diff --git a/crates/router/src/connector/adyen.rs b/crates/router/src/connector/adyen.rsindex 2471beba32..ba4e83f414 100644--- a/crates/router/src/connector/adyen.rs+++ b/crates/router/src/connector/adyen.rs@@ -385,6 +385,17 @@ impl),}}+ adyen::AdyenRedirectRequestTypes::AdyenRefusal(req) => {+ adyen::AdyenRedirectRequest {+ details: adyen::AdyenRedirectRequestTypes::AdyenRefusal(+ adyen::AdyenRefusal {+ payload: req.payload,+ type_of_redirection_result: None,+ result_code: None,+ },+ ),+ }+ }};let adyen_request = types::RequestBody::log_and_get_request_body(diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rsindex 5bb232fdb1..02f1b570ca 100644--- a/crates/router/src/connector/adyen/transformers.rs+++ b/crates/router/src/connector/adyen/transformers.rs@@ -226,6 +226,16 @@ pub struct AdyenRedirectRequest {pub enum AdyenRedirectRequestTypes {AdyenRedirection(AdyenRedirection),AdyenThreeDS(AdyenThreeDS),+ AdyenRefusal(AdyenRefusal),+}++#[derive(Debug, Clone, Serialize, serde::Deserialize, Eq, PartialEq)]+#[serde(rename_all = "camelCase")]+pub struct AdyenRefusal {+ pub payload: String,+ #[serde(rename = "type")]+ pub type_of_redirection_result: Option<String>,+ pub result_code: Option<String>,}#[derive(Debug, Clone, Serialize, serde::Deserialize, Eq, PartialEq)]