From 682947866e6afc197c71bbd255f22ae427704590 Mon Sep 17 00:00:00 2001 From: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:47:24 +0530 Subject: [PATCH] fix(core): add payment_id as query param in merchant return url (#6665) Co-authored-by: Chikke Srujan --- crates/router/src/core/payments/helpers.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs index d4f5b3b49f0d..8435f09e8f3c 100644 --- a/crates/router/src/core/payments/helpers.rs +++ b/crates/router/src/core/payments/helpers.rs @@ -2948,11 +2948,13 @@ pub fn make_merchant_url_with_response( .ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("Expected client secret to be `Some`")?; + let payment_id = redirection_response.payment_id.get_string_repr().to_owned(); let merchant_url_with_response = if business_profile.redirect_to_merchant_with_http_post { url::Url::parse_with_params( url, &[ ("status", status_check.to_string()), + ("payment_id", payment_id), ( "payment_intent_client_secret", payment_client_secret.peek().to_string(), @@ -2971,6 +2973,7 @@ pub fn make_merchant_url_with_response( url, &[ ("status", status_check.to_string()), + ("payment_id", payment_id), ( "payment_intent_client_secret", payment_client_secret.peek().to_string(),