Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(router): Add manual retry flag in Re-direction url (#1791)

Sahkal Poddar20f664408ac1
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index 8ddb12da8c..25450aaf22 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -1447,6 +1447,7 @@ pub fn get_handle_response_url(
redirection_response,
payments_return_url,
response.client_secret.as_ref(),
+ response.manual_retry_allowed,
)
.attach_printable("Failed to make merchant url with response")?;
@@ -1458,6 +1459,7 @@ pub fn make_merchant_url_with_response(
redirection_response: api::PgRedirectResponse,
request_return_url: Option<&String>,
client_secret: Option<&masking::Secret<String>>,
+ manual_retry_allowed: Option<bool>,
) -> RouterResult<String> {
// take return url if provided in the request else use merchant return url
let url = request_return_url
@@ -1480,6 +1482,10 @@ pub fn make_merchant_url_with_response(
"payment_intent_client_secret",
payment_client_secret.peek().to_string(),
),
+ (
+ "manual_retry_allowed",
+ manual_retry_allowed.unwrap_or(false).to_string(),
+ ),
],
)
.into_report()
@@ -1496,6 +1502,10 @@ pub fn make_merchant_url_with_response(
payment_client_secret.peek().to_string(),
),
("amount", amount.to_string()),
+ (
+ "manual_retry_allowed",
+ manual_retry_allowed.unwrap_or(false).to_string(),
+ ),
],
)
.into_report()