feat(router): Add Cancel Event in Webhooks and Mapping it in Stripe (#2573)

This commit is contained in:
DEEPANSHU BANSAL
2023-10-13 16:35:00 +05:30
committed by GitHub
parent d4019751ff
commit 92f7918e6f
9 changed files with 16 additions and 4 deletions

View File

@ -12,6 +12,7 @@ pub enum IncomingWebhookEvent {
PaymentIntentSuccess,
PaymentIntentProcessing,
PaymentIntentPartiallyFunded,
PaymentIntentCancelled,
PaymentActionRequired,
EventNotSupported,
SourceChargeable,
@ -84,7 +85,8 @@ impl From<IncomingWebhookEvent> for WebhookFlow {
| IncomingWebhookEvent::PaymentIntentSuccess
| IncomingWebhookEvent::PaymentIntentProcessing
| IncomingWebhookEvent::PaymentActionRequired
| IncomingWebhookEvent::PaymentIntentPartiallyFunded => Self::Payment,
| IncomingWebhookEvent::PaymentIntentPartiallyFunded
| IncomingWebhookEvent::PaymentIntentCancelled => Self::Payment,
IncomingWebhookEvent::EventNotSupported => Self::ReturnResponse,
IncomingWebhookEvent::RefundSuccess | IncomingWebhookEvent::RefundFailure => {
Self::Refund