mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(core): enable payments void for multiple partial capture (#2048)
This commit is contained in:
@ -59,6 +59,36 @@ pub enum AttemptStatus {
|
||||
DeviceDataCollectionPending,
|
||||
}
|
||||
|
||||
impl AttemptStatus {
|
||||
pub fn is_terminal_status(self) -> bool {
|
||||
match self {
|
||||
Self::RouterDeclined
|
||||
| Self::Charged
|
||||
| Self::AutoRefunded
|
||||
| Self::Voided
|
||||
| Self::VoidFailed
|
||||
| Self::CaptureFailed
|
||||
| Self::Failure => true,
|
||||
Self::Started
|
||||
| Self::AuthenticationFailed
|
||||
| Self::AuthenticationPending
|
||||
| Self::AuthenticationSuccessful
|
||||
| Self::Authorized
|
||||
| Self::AuthorizationFailed
|
||||
| Self::Authorizing
|
||||
| Self::CodInitiated
|
||||
| Self::VoidInitiated
|
||||
| Self::CaptureInitiated
|
||||
| Self::PartialCharged
|
||||
| Self::Unresolved
|
||||
| Self::Pending
|
||||
| Self::PaymentMethodAwaited
|
||||
| Self::ConfirmationAwaited
|
||||
| Self::DeviceDataCollectionPending => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
|
||||
Reference in New Issue
Block a user