mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
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:
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user