fix(connector): [Adyen Platform] wasm configs and webhook status mapping (#6161)

This commit is contained in:
Sakil Mostak
2024-09-30 20:16:38 +05:30
committed by GitHub
parent da1f23d235
commit 6b0f7e4870
4 changed files with 29 additions and 15 deletions

View File

@ -320,6 +320,8 @@ label="Source balance account ID"
placeholder="Enter Source balance account ID" placeholder="Enter Source balance account ID"
required=true required=true
type="Text" type="Text"
[adyenplatform_payout.connector_webhook_details]
merchant_secret="Source verification key"
[airwallex] [airwallex]
[[airwallex.credit]] [[airwallex.credit]]

View File

@ -124,6 +124,21 @@ key1="Adyen Account Id"
[adyen.connector_webhook_details] [adyen.connector_webhook_details]
merchant_secret="Source verification key" 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]] [[adyen.metadata.apple_pay]]
name="certificate" name="certificate"
label="Merchant Certificate (Base64 Encoded)" label="Merchant Certificate (Base64 Encoded)"

View File

@ -320,6 +320,8 @@ label="Source balance account ID"
placeholder="Enter Source balance account ID" placeholder="Enter Source balance account ID"
required=true required=true
type="Text" type="Text"
[adyenplatform_payout.connector_webhook_details]
merchant_secret="Source verification key"
[airwallex] [airwallex]
[[airwallex.credit]] [[airwallex.credit]]

View File

@ -367,7 +367,8 @@ pub struct AdyenplatformIncomingWebhookData {
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct AdyenplatformInstantStatus { pub struct AdyenplatformInstantStatus {
status: InstantPriorityStatus, status: Option<InstantPriorityStatus>,
estimated_arrival_time: Option<String>,
} }
#[cfg(feature = "payouts")] #[cfg(feature = "payouts")]
@ -416,20 +417,14 @@ impl
) -> Self { ) -> Self {
match (event_type, status, instant_status) { match (event_type, status, instant_status) {
(AdyenplatformWebhookEventType::PayoutCreated, _, _) => Self::PayoutCreated, (AdyenplatformWebhookEventType::PayoutCreated, _, _) => Self::PayoutCreated,
( (AdyenplatformWebhookEventType::PayoutUpdated, _, Some(instant_status)) => {
AdyenplatformWebhookEventType::PayoutUpdated, match (instant_status.status, instant_status.estimated_arrival_time) {
_, (Some(InstantPriorityStatus::Credited), _) | (None, Some(_)) => {
Some(AdyenplatformInstantStatus { Self::PayoutSuccess
status: InstantPriorityStatus::Credited, }
}), _ => Self::PayoutProcessing,
) => Self::PayoutSuccess, }
( }
AdyenplatformWebhookEventType::PayoutUpdated,
_,
Some(AdyenplatformInstantStatus {
status: InstantPriorityStatus::Pending,
}),
) => Self::PayoutProcessing,
(AdyenplatformWebhookEventType::PayoutUpdated, status, _) => match status { (AdyenplatformWebhookEventType::PayoutUpdated, status, _) => match status {
AdyenplatformWebhookStatus::Authorised AdyenplatformWebhookStatus::Authorised
| AdyenplatformWebhookStatus::Booked | AdyenplatformWebhookStatus::Booked