mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
chore: v2 api changes for session token endpoint (#6032)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -4505,6 +4505,19 @@ impl From<&VerifyRequest> for MandateValidationFields {
|
||||
}
|
||||
}
|
||||
|
||||
// #[cfg(all(feature = "v2", feature = "payment_v2"))]
|
||||
// impl From<PaymentsSessionRequest> for PaymentsSessionResponse {
|
||||
// fn from(item: PaymentsSessionRequest) -> Self {
|
||||
// let client_secret: Secret<String, pii::ClientSecret> = Secret::new(item.client_secret);
|
||||
// Self {
|
||||
// session_token: vec![],
|
||||
// payment_id: item.payment_id,
|
||||
// client_secret,
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
impl From<PaymentsSessionRequest> for PaymentsSessionResponse {
|
||||
fn from(item: PaymentsSessionRequest) -> Self {
|
||||
let client_secret: Secret<String, pii::ClientSecret> = Secret::new(item.client_secret);
|
||||
@ -4752,6 +4765,11 @@ pub struct RedirectResponse {
|
||||
pub json_payload: Option<pii::SecretSerdeValue>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
pub struct PaymentsSessionRequest {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
|
||||
pub struct PaymentsSessionRequest {
|
||||
/// The identifier for the payment
|
||||
|
||||
Reference in New Issue
Block a user