diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml index 3863f5364b5..abe25e5c2b0 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 0dc86b2f555..32d6d96bb90 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 7861d53d127..b4de938bc80 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 09772fc87de..e2a72ad52b8 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, + estimated_arrival_time: Option, } #[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