mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
fix(core): introduce new attempt and intent status to handle multiple partial captures (#2802)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com>
This commit is contained in:
@ -50,6 +50,7 @@ pub enum AttemptStatus {
|
||||
VoidFailed,
|
||||
AutoRefunded,
|
||||
PartialCharged,
|
||||
PartialChargedAndChargeable,
|
||||
Unresolved,
|
||||
#[default]
|
||||
Pending,
|
||||
@ -68,7 +69,8 @@ impl AttemptStatus {
|
||||
| Self::Voided
|
||||
| Self::VoidFailed
|
||||
| Self::CaptureFailed
|
||||
| Self::Failure => true,
|
||||
| Self::Failure
|
||||
| Self::PartialCharged => true,
|
||||
Self::Started
|
||||
| Self::AuthenticationFailed
|
||||
| Self::AuthenticationPending
|
||||
@ -79,7 +81,7 @@ impl AttemptStatus {
|
||||
| Self::CodInitiated
|
||||
| Self::VoidInitiated
|
||||
| Self::CaptureInitiated
|
||||
| Self::PartialCharged
|
||||
| Self::PartialChargedAndChargeable
|
||||
| Self::Unresolved
|
||||
| Self::Pending
|
||||
| Self::PaymentMethodAwaited
|
||||
@ -861,6 +863,7 @@ pub enum IntentStatus {
|
||||
RequiresConfirmation,
|
||||
RequiresCapture,
|
||||
PartiallyCaptured,
|
||||
PartiallyCapturedAndCapturable,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
|
||||
Reference in New Issue
Block a user