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): [Adyen Platform] wasm configs and webhook status mapping (#6161)

Sakil Mostak6b0f7e487088
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index 3863f5364b..abe25e5c2b 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -320,6 +320,8 @@ label="Source balance account ID"
placeholder="Enter Source balance account ID"
required=true
type="Text"
+[adyenplatform_payout.connector_webhook_details]
+merchant_secret="Source verification key"
[airwallex]
[[airwallex.credit]]
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index 0dc86b2f55..32d6d96bb9 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -124,6 +124,21 @@ key1="Adyen Account Id"
[adyen.connector_webhook_details]
merchant_secret="Source verification key"
+[adyenplatform_payout]
+[[adyenplatform_payout.bank_transfer]]
+ payment_method_type = "sepa"
+[adyenplatform_payout.connector_auth.HeaderKey]
+api_key = "Adyen platform's API Key"
+
+[adyenplatform_payout.metadata.source_balance_account]
+name="source_balance_account"
+label="Source balance account ID"
+placeholder="Enter Source balance account ID"
+required=true
+type="Text"
+[adyenplatform_payout.connector_webhook_details]
+merchant_secret="Source verification key"
+
[[adyen.metadata.apple_pay]]
name="certificate"
label="Merchant Certificate (Base64 Encoded)"
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index 7861d53d12..b4de938bc8 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -320,6 +320,8 @@ label="Source balance account ID"
placeholder="Enter Source balance account ID"
required=true
type="Text"
+[adyenplatform_payout.connector_webhook_details]
+merchant_secret="Source verification key"
[airwallex]
[[airwallex.credit]]
diff --git a/crates/router/src/connector/adyenplatform/transformers/payouts.rs b/crates/router/src/connector/adyenplatform/transformers/payouts.rs
index 09772fc87d..e2a72ad52b 100644
--- a/crates/router/src/connector/adyenplatform/transformers/payouts.rs
+++ b/crates/router/src/connector/adyenplatform/transformers/payouts.rs
@@ -367,7 +367,8 @@ pub struct AdyenplatformIncomingWebhookData {
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AdyenplatformInstantStatus {
- status: InstantPriorityStatus,
+ status: Option<InstantPriorityStatus>,
+ estimated_arrival_time: Option<String>,
}
#[cfg(feature = "payouts")]
@@ -416,20 +417,14 @@ impl
) -> Self {
match (event_type, status, instant_status) {
(AdyenplatformWebhookEventType::PayoutCreated, _, _) => Self::PayoutCreated,
- (
- AdyenplatformWebhookEventType::PayoutUpdated,
- _,
- Some(AdyenplatformInstantStatus {
- status: InstantPriorityStatus::Credited,
- }),
- ) => Self::PayoutSuccess,
- (
- AdyenplatformWebhookEventType::PayoutUpdated,
- _,
- Some(AdyenplatformInstantStatus {
- status: InstantPriorityStatus::Pending,
- }),
- ) => Self::PayoutProcessing,
+ (AdyenplatformWebhookEventType::PayoutUpdated, _, Some(instant_status)) => {
+ match (instant_status.status, instant_status.estimated_arrival_time) {
+ (Some(InstantPriorityStatus::Credited), _) | (None, Some(_)) => {
+ Self::PayoutSuccess
+ }
+ _ => Self::PayoutProcessing,
+ }
+ }
(AdyenplatformWebhookEventType::PayoutUpdated, status, _) => match status {
AdyenplatformWebhookStatus::Authorised
| AdyenplatformWebhookStatus::Booked