feat(webhook): add frm webhook support (#4662)

Signed-off-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
chikke srujan
2024-05-22 13:45:01 +05:30
committed by GitHub
parent 2ad7fc0cd6
commit ae601e8e1b
7 changed files with 400 additions and 38 deletions

View File

@ -39,6 +39,8 @@ pub enum IncomingWebhookEvent {
MandateRevoked,
EndpointVerification,
ExternalAuthenticationARes,
FrmApproved,
FrmRejected,
}
pub enum WebhookFlow {
@ -50,6 +52,7 @@ pub enum WebhookFlow {
BankTransfer,
Mandate,
ExternalAuthentication,
FraudCheck,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
@ -119,6 +122,9 @@ impl From<IncomingWebhookEvent> for WebhookFlow {
IncomingWebhookEvent::SourceChargeable
| IncomingWebhookEvent::SourceTransactionCreated => Self::BankTransfer,
IncomingWebhookEvent::ExternalAuthenticationARes => Self::ExternalAuthentication,
IncomingWebhookEvent::FrmApproved | IncomingWebhookEvent::FrmRejected => {
Self::FraudCheck
}
}
}
}