fix: payment_id and client_secret in session response (#199)

This commit is contained in:
Sangamesh Kulkarni
2022-12-23 00:57:27 +05:30
committed by GitHub
parent 9e0deac3c5
commit de30489ce3
3 changed files with 62 additions and 2 deletions

View File

@ -165,6 +165,12 @@ where
) -> RouterResponse<Self> {
Ok(services::BachResponse::Json(Self {
session_token: payment_data.sessions_token,
payment_id: payment_data.payment_attempt.payment_id,
client_secret: payment_data
.payment_intent
.client_secret
.get_required_value("client_secret")?
.into(),
}))
}
}