mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
feat(payments_v2): add finish redirection endpoint (#6549)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
This commit is contained in:
@ -2007,7 +2007,7 @@ pub struct ProfileCreate {
|
||||
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")]
|
||||
pub return_url: Option<url::Url>,
|
||||
pub return_url: Option<common_utils::types::Url>,
|
||||
|
||||
/// A boolean value to indicate if payment response hash needs to be enabled
|
||||
#[schema(default = true, example = true)]
|
||||
@ -2244,7 +2244,7 @@ pub struct ProfileResponse {
|
||||
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")]
|
||||
pub return_url: Option<String>,
|
||||
pub return_url: Option<common_utils::types::Url>,
|
||||
|
||||
/// A boolean value to indicate if payment response hash needs to be enabled
|
||||
#[schema(default = true, example = true)]
|
||||
@ -2474,7 +2474,7 @@ pub struct ProfileUpdate {
|
||||
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")]
|
||||
pub return_url: Option<url::Url>,
|
||||
pub return_url: Option<common_utils::types::Url>,
|
||||
|
||||
/// A boolean value to indicate if payment response hash needs to be enabled
|
||||
#[schema(default = true, example = true)]
|
||||
|
||||
@ -4517,6 +4517,7 @@ pub struct PaymentsResponse {
|
||||
/// Request for Payment Intent Confirm
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct PaymentsConfirmIntentRequest {
|
||||
/// The URL to which you want the user to be redirected after the completion of the payment operation
|
||||
/// If this url is not passed, the url configured in the business profile will be used
|
||||
@ -4557,6 +4558,10 @@ pub struct PaymentsRetrieveRequest {
|
||||
/// If this is set to true, the status will be fetched from the connector
|
||||
#[serde(default)]
|
||||
pub force_sync: bool,
|
||||
|
||||
/// These are the query params that are sent in case of redirect response.
|
||||
/// These can be ingested by the connector to take necessary actions.
|
||||
pub param: Option<String>,
|
||||
}
|
||||
|
||||
/// Error details for the payment
|
||||
@ -5208,6 +5213,7 @@ pub struct PgRedirectResponse {
|
||||
pub amount: Option<MinorUnit>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
#[derive(Debug, serde::Serialize, PartialEq, Eq, serde::Deserialize)]
|
||||
pub struct RedirectionResponse {
|
||||
pub return_url: String,
|
||||
@ -5217,6 +5223,12 @@ pub struct RedirectionResponse {
|
||||
pub headers: Vec<(String, String)>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Debug, serde::Serialize, PartialEq, Eq, serde::Deserialize)]
|
||||
pub struct RedirectionResponse {
|
||||
pub return_url_with_query_params: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
pub struct PaymentsResponseForm {
|
||||
pub transaction_id: String,
|
||||
|
||||
Reference in New Issue
Block a user