feat(payments): add support for manual retries in payments confirm call (#1170)

This commit is contained in:
Abhishek Marrivagu
2023-05-18 13:46:38 +05:30
committed by GitHub
parent 5e51b6b16d
commit 1f52a66452
5 changed files with 273 additions and 28 deletions

View File

@ -123,6 +123,10 @@ pub enum PaymentIntentUpdate {
PaymentAttemptUpdate {
active_attempt_id: String,
},
StatusAndAttemptUpdate {
status: storage_enums::IntentStatus,
active_attempt_id: String,
},
}
#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)]
@ -273,6 +277,14 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
active_attempt_id: Some(active_attempt_id),
..Default::default()
},
PaymentIntentUpdate::StatusAndAttemptUpdate {
status,
active_attempt_id,
} => Self {
status: Some(status),
active_attempt_id: Some(active_attempt_id),
..Default::default()
},
}
}
}