feat: ACH transfers (#905)

This commit is contained in:
Sangamesh Kulkarni
2023-05-19 15:14:29 +05:30
committed by GitHub
parent 39405bb478
commit 23bca66b81
39 changed files with 1247 additions and 66 deletions

View File

@ -12,6 +12,9 @@ pub enum IncomingWebhookEvent {
PaymentIntentProcessing,
PaymentActionRequired,
EventNotSupported,
SourceChargeable,
SourceTransactionCreated,
ChargeSucceeded,
RefundFailure,
RefundSuccess,
DisputeOpened,
@ -32,6 +35,7 @@ pub enum WebhookFlow {
Dispute,
Subscription,
ReturnResponse,
BankTransfer,
}
impl From<IncomingWebhookEvent> for WebhookFlow {
@ -52,6 +56,9 @@ impl From<IncomingWebhookEvent> for WebhookFlow {
IncomingWebhookEvent::DisputeWon => Self::Dispute,
IncomingWebhookEvent::DisputeLost => Self::Dispute,
IncomingWebhookEvent::EndpointVerification => Self::ReturnResponse,
IncomingWebhookEvent::SourceChargeable
| IncomingWebhookEvent::SourceTransactionCreated => Self::BankTransfer,
IncomingWebhookEvent::ChargeSucceeded => Self::Payment,
}
}
}