mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(core): Add Support for redirection inside Iframe (#7976)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1999,6 +1999,9 @@ pub struct ProfileCreate {
|
||||
//Merchant country for the profile
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[nutype::nutype(
|
||||
@ -2132,6 +2135,9 @@ pub struct ProfileCreate {
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
|
||||
/// Indicates if external vault is enabled or not.
|
||||
pub is_external_vault_enabled: Option<bool>,
|
||||
|
||||
@ -2437,6 +2443,9 @@ pub struct ProfileResponse {
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
|
||||
/// Indicates if external vault is enabled or not.
|
||||
pub is_external_vault_enabled: Option<bool>,
|
||||
|
||||
@ -2590,6 +2599,9 @@ pub struct ProfileUpdate {
|
||||
//Merchant country for the profile
|
||||
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
|
||||
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
|
||||
@ -1161,6 +1161,9 @@ pub struct PaymentsRequest {
|
||||
|
||||
/// Indicates if 3DS method data was successfully completed or not
|
||||
pub threeds_method_comp_ind: Option<ThreeDsCompletionIndicator>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
@ -4471,6 +4474,7 @@ pub enum NextActionType {
|
||||
DisplayBankTransferInformation,
|
||||
DisplayWaitScreen,
|
||||
CollectOtp,
|
||||
RedirectInsidePopup,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, ToSchema)]
|
||||
@ -4481,6 +4485,10 @@ pub enum NextActionData {
|
||||
RedirectToUrl {
|
||||
redirect_to_url: String,
|
||||
},
|
||||
#[cfg(feature = "v1")]
|
||||
RedirectInsidePopup {
|
||||
popup_url: String,
|
||||
},
|
||||
/// Contains the url for redirection flow
|
||||
#[cfg(feature = "v2")]
|
||||
RedirectToUrl {
|
||||
@ -5130,6 +5138,9 @@ pub struct PaymentsResponse {
|
||||
|
||||
/// Error message received from the issuer in case of failed payments
|
||||
pub issuer_error_message: Option<String>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
@ -5472,6 +5483,9 @@ pub struct PaymentsRequest {
|
||||
|
||||
/// Indicates if 3ds challenge is forced
|
||||
pub force_3ds_challenge: Option<bool>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
@ -5686,6 +5700,9 @@ pub struct PaymentsResponse {
|
||||
/// This depeneds on the 3DS rules configured, If not a default authentication type will be applied
|
||||
#[schema(value_type = Option<AuthenticationType>, example = "no_three_ds", default = "no_three_ds")]
|
||||
pub authentication_type_applied: Option<api_enums::AuthenticationType>,
|
||||
|
||||
/// Indicates if the redirection has to open in the iframe
|
||||
pub is_iframe_redirection_enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
|
||||
Reference in New Issue
Block a user