mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(router): add requeue support for payments and fix duplicate entry error in process tracker for requeued payments (#1567)
This commit is contained in:
committed by
GitHub
parent
7489c870d9
commit
b967d23251
@ -973,3 +973,23 @@ pub struct UnresolvedResponseReason {
|
||||
/// A message to merchant to give hint on next action he/she should do to resolve
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Debug,
|
||||
serde::Deserialize,
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
Clone,
|
||||
PartialEq,
|
||||
Eq,
|
||||
ToSchema,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum RetryAction {
|
||||
/// Payment can be retried from the client side until the payment is successful or payment expires or the attempts(configured by the merchant) for payment are exhausted
|
||||
ManualRetry,
|
||||
/// Denotes that the payment is requeued
|
||||
Requeue,
|
||||
}
|
||||
|
||||
@ -278,9 +278,9 @@ pub struct PaymentsRequest {
|
||||
/// Business sub label for the payment
|
||||
pub business_sub_label: Option<String>,
|
||||
|
||||
/// If enabled payment can be retried from the client side until the payment is successful or payment expires or the attempts(configured by the merchant) for payment are exhausted.
|
||||
#[serde(default)]
|
||||
pub manual_retry: bool,
|
||||
/// Denotes the retry action
|
||||
#[schema(value_type = Option<RetryAction>)]
|
||||
pub retry_action: Option<api_enums::RetryAction>,
|
||||
|
||||
/// Any user defined fields can be passed here.
|
||||
#[schema(value_type = Option<Object>, example = r#"{ "udf1": "some-value", "udf2": "some-value" }"#)]
|
||||
|
||||
Reference in New Issue
Block a user