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

fix(connector): Manual capture on adyen results partially_captured (#10044)

Nithin N07dc5255903a
diff --git a/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs b/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs
index eacc400a46..4e50d52882 100644
--- a/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs
@@ -4932,7 +4932,7 @@ impl TryFrom<&AdyenRouterData<&PaymentsCaptureRouterData>> for AdyenCaptureReque
reference,
amount: Amount {
currency: item.router_data.request.currency,
- value: item.amount.to_owned(),
+ value: item.router_data.request.minor_amount_to_capture,
},
})
}
@@ -4984,7 +4984,7 @@ impl TryFrom<PaymentsCaptureResponseRouterData<AdyenCaptureResponse>>
incremental_authorization_allowed: None,
charges,
}),
- amount_captured: Some(0),
+ amount_captured: None, // updated by Webhooks
..item.data
})
}
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Adyen.js b/cypress-tests/cypress/e2e/configs/Payment/Adyen.js
index a7d61a7f18..a02e58fb8c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Adyen.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Adyen.js
@@ -207,7 +207,7 @@ export const connectorDetails = {
status: "processing",
amount: 6000,
amount_capturable: 6000,
- amount_received: 0,
+ amount_received: null,
},
},
},
@@ -221,7 +221,7 @@ export const connectorDetails = {
status: "processing",
amount: 6000,
amount_capturable: 6000,
- amount_received: 0, // Amount is updated via webhooks
+ amount_received: null, // Amount is updated via webhooks
},
},
},
@@ -235,7 +235,7 @@ export const connectorDetails = {
status: "processing",
amount: 6000,
amount_capturable: 6000,
- amount_received: 0,
+ amount_received: null,
},
},
},