Skip to content

Commit

Permalink
fix(core): add payment_id as query param in merchant return url (#6665)
Browse files Browse the repository at this point in the history
Co-authored-by: Chikke Srujan <[email protected]>
  • Loading branch information
srujanchikke and Chikke Srujan authored Nov 26, 2024
1 parent 3120494 commit 6829478
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/router/src/core/payments/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down

0 comments on commit 6829478

Please sign in to comment.