Skip to content

Commit e023eb8

Browse files
refactor(connector): [Stripe] add support for more incoming woocommerce Stripe disputes webhooks (#2150)
1 parent daa0759 commit e023eb8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

crates/router/src/connector/stripe.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,11 +1869,14 @@ impl api::IncomingWebhook for Stripe {
18691869
stripe::WebhookEventType::PaymentIntentRequiresAction => {
18701870
api::IncomingWebhookEvent::PaymentActionRequired
18711871
}
1872+
stripe::WebhookEventType::ChargeDisputeFundsWithdrawn => {
1873+
api::IncomingWebhookEvent::DisputeLost
1874+
}
1875+
stripe::WebhookEventType::ChargeDisputeFundsReinstated => {
1876+
api::IncomingWebhookEvent::DisputeWon
1877+
}
18721878
stripe::WebhookEventType::Unknown
18731879
| stripe::WebhookEventType::ChargeCaptured
1874-
| stripe::WebhookEventType::ChargeDisputeCaptured
1875-
| stripe::WebhookEventType::ChargeDisputeFundsReinstated
1876-
| stripe::WebhookEventType::ChargeDisputeFundsWithdrawn
18771880
| stripe::WebhookEventType::ChargeExpired
18781881
| stripe::WebhookEventType::ChargeFailed
18791882
| stripe::WebhookEventType::ChargePending

crates/router/src/connector/stripe/transformers.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,8 +3055,6 @@ pub enum WebhookEventType {
30553055
PaymentIntentFailed,
30563056
#[serde(rename = "payment_intent.succeeded")]
30573057
PaymentIntentSucceed,
3058-
#[serde(rename = "charge.dispute.captured")]
3059-
ChargeDisputeCaptured,
30603058
#[serde(rename = "charge.dispute.created")]
30613059
DisputeCreated,
30623060
#[serde(rename = "charge.dispute.closed")]

0 commit comments

Comments
 (0)