feat(core): Add support for Void after Capture (#8839)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2025-08-06 13:15:43 +05:30
committed by GitHub
parent 0598782048
commit 57e92c9fda
61 changed files with 1422 additions and 87 deletions

View File

@ -432,7 +432,9 @@ impl From<api_enums::IntentStatus> for StripePaymentStatus {
api_enums::IntentStatus::RequiresConfirmation => Self::RequiresConfirmation,
api_enums::IntentStatus::RequiresCapture
| api_enums::IntentStatus::PartiallyCapturedAndCapturable => Self::RequiresCapture,
api_enums::IntentStatus::Cancelled => Self::Canceled,
api_enums::IntentStatus::Cancelled | api_enums::IntentStatus::CancelledPostCapture => {
Self::Canceled
}
}
}
}

View File

@ -324,7 +324,9 @@ impl From<api_enums::IntentStatus> for StripeSetupStatus {
logger::error!("Invalid status change");
Self::Canceled
}
api_enums::IntentStatus::Cancelled => Self::Canceled,
api_enums::IntentStatus::Cancelled | api_enums::IntentStatus::CancelledPostCapture => {
Self::Canceled
}
}
}
}

View File

@ -271,6 +271,7 @@ fn get_stripe_event_type(event_type: api_models::enums::EventType) -> &'static s
api_models::enums::EventType::PaymentFailed => "payment_intent.payment_failed",
api_models::enums::EventType::PaymentProcessing => "payment_intent.processing",
api_models::enums::EventType::PaymentCancelled
| api_models::enums::EventType::PaymentCancelledPostCapture
| api_models::enums::EventType::PaymentExpired => "payment_intent.canceled",
// the below are not really stripe compatible because stripe doesn't provide this