mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
fix: payment_id and client_secret in session response (#199)
This commit is contained in:
committed by
GitHub
parent
9e0deac3c5
commit
de30489ce3
@ -586,9 +586,12 @@ impl From<PaymentsSessionRequest> for PaymentsResponse {
|
||||
}
|
||||
|
||||
impl From<PaymentsSessionRequest> for PaymentsSessionResponse {
|
||||
fn from(_item: PaymentsSessionRequest) -> Self {
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -790,6 +793,8 @@ pub enum SessionToken {
|
||||
|
||||
#[derive(Default, Debug, serde::Serialize, Clone)]
|
||||
pub struct PaymentsSessionResponse {
|
||||
pub payment_id: String,
|
||||
pub client_secret: Secret<String, pii::ClientSecret>,
|
||||
pub session_token: Vec<SessionToken>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user