fix(connector): Add RedirectInsidePopup response redirection URL (#8257)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
awasthi21
2025-06-10 22:48:47 +05:30
committed by GitHub
parent a76a9c1514
commit df34ff43dc
8 changed files with 24 additions and 8 deletions

View File

@ -858,7 +858,7 @@ pub(crate) fn into_stripe_next_action(
},
}
}
payments::NextActionData::RedirectInsidePopup { popup_url } => {
payments::NextActionData::RedirectInsidePopup { popup_url, .. } => {
StripeNextAction::RedirectToUrl {
redirect_to_url: RedirectUrl {
return_url,

View File

@ -411,7 +411,7 @@ pub(crate) fn into_stripe_next_action(
},
}
}
payments::NextActionData::RedirectInsidePopup { popup_url } => {
payments::NextActionData::RedirectInsidePopup { popup_url, .. } => {
StripeNextAction::RedirectToUrl {
redirect_to_url: RedirectUrl {
return_url,

View File

@ -2546,7 +2546,7 @@ impl PaymentRedirectFlow for PaymentRedirectCompleteAuthorize {
.clone()
.and_then(|next_action_data| match next_action_data {
api_models::payments::NextActionData::RedirectToUrl { redirect_to_url } => Some(redirect_to_url),
api_models::payments::NextActionData::RedirectInsidePopup{popup_url} => Some(popup_url),
api_models::payments::NextActionData::RedirectInsidePopup{popup_url, ..} => Some(popup_url),
api_models::payments::NextActionData::DisplayBankTransferInformation { .. } => None,
api_models::payments::NextActionData::ThirdPartySdkSessionToken { .. } => None,
api_models::payments::NextActionData::QrCodeInformation{..} => None,

View File

@ -2513,6 +2513,13 @@ where
})
.unwrap_or_default(),
);
let connector_name = payment_attempt.connector.as_deref().unwrap_or_default();
let router_return_url = helpers::create_redirect_url(
&base_url.to_string(),
&payment_attempt,
connector_name,
payment_data.get_creds_identifier(),
);
let output = if payments::is_start_pay(&operation)
&& payment_attempt.authentication_data.is_some()
@ -2607,6 +2614,7 @@ where
if payment_intent.is_iframe_redirection_enabled.unwrap_or(false) {
api_models::payments::NextActionData::RedirectInsidePopup {
popup_url: redirect_url,
redirect_response_url:router_return_url
}
} else {
api_models::payments::NextActionData::RedirectToUrl {