diff --git a/crates/router/src/connector/iatapay/transformers.rs b/crates/router/src/connector/iatapay/transformers.rs index ec1deb34cee0..1a5f7252358d 100644 --- a/crates/router/src/connector/iatapay/transformers.rs +++ b/crates/router/src/connector/iatapay/transformers.rs @@ -464,6 +464,7 @@ pub enum RefundStatus { Initiated, Authorized, Settled, + Cleared, Failed, } @@ -476,6 +477,7 @@ impl From for enums::RefundStatus { RefundStatus::Initiated => Self::Pending, RefundStatus::Authorized => Self::Pending, RefundStatus::Settled => Self::Success, + RefundStatus::Cleared => Self::Success, } } } @@ -642,9 +644,9 @@ impl TryFrom for api::IncomingWebhookEvent { | IatapayWebhookStatus::Unknown => Ok(Self::EventNotSupported), }, IatapayWebhookResponse::IatapayRefundWebhookBody(wh_body) => match wh_body.status { - IatapayRefundWebhookStatus::Authorized | IatapayRefundWebhookStatus::Settled => { - Ok(Self::RefundSuccess) - } + IatapayRefundWebhookStatus::Cleared + | IatapayRefundWebhookStatus::Authorized + | IatapayRefundWebhookStatus::Settled => Ok(Self::RefundSuccess), IatapayRefundWebhookStatus::Failed => Ok(Self::RefundFailure), IatapayRefundWebhookStatus::Created | IatapayRefundWebhookStatus::Locked @@ -680,6 +682,7 @@ pub enum IatapayRefundWebhookStatus { Authorized, Settled, Failed, + Cleared, Locked, #[serde(other)] Unknown,