mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
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:
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user