mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
fix(connector): [Adyen Platform] wasm configs and webhook status mapping (#6161)
This commit is contained in:
@ -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]]
|
||||||
|
|||||||
@ -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)"
|
||||||
|
|||||||
@ -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]]
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user