mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(braintree): Sessions flow for braintree and klarna (#121)
This commit is contained in:
@ -532,13 +532,8 @@ impl From<PaymentsStartRequest> for PaymentsResponse {
|
||||
|
||||
impl From<PaymentsSessionRequest> for PaymentsResponse {
|
||||
fn from(item: PaymentsSessionRequest) -> Self {
|
||||
let payment_id = match item.payment_id {
|
||||
PaymentIdType::PaymentIntentId(id) => Some(id),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
Self {
|
||||
payment_id,
|
||||
payment_id: Some(item.payment_id),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
@ -664,11 +659,12 @@ pub struct PaymentsRetrieveRequest {
|
||||
pub struct ConnectorSessionToken {
|
||||
pub connector_name: String,
|
||||
pub session_token: String,
|
||||
pub session_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, serde::Deserialize, Clone)]
|
||||
pub struct PaymentsSessionRequest {
|
||||
pub payment_id: PaymentIdType,
|
||||
pub payment_id: String,
|
||||
pub client_secret: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user