feat(session): ability to request session token for specific wallets (#280)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Narayan Bhat
2023-01-11 12:47:52 +05:30
committed by GitHub
parent 9ad56703c4
commit 5809408cf9
18 changed files with 90 additions and 96 deletions

View File

@ -509,6 +509,15 @@ pub enum Connector {
Worldpay,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone)]
#[serde(rename_all = "snake_case")]
pub enum SupportedWallets {
Paypal,
ApplePay,
Klarna,
Gpay,
}
impl From<AttemptStatus> for IntentStatus {
fn from(s: AttemptStatus) -> Self {
match s {

View File

@ -751,15 +751,6 @@ pub struct PaymentsRetrieveRequest {
pub connector: Option<String>,
}
#[derive(Debug, serde::Deserialize, Clone)]
#[serde(rename_all = "snake_case")]
pub enum SupportedWallets {
Paypal,
ApplePay,
Klarna,
Gpay,
}
#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone)]
pub struct OrderDetails {
pub product_name: String,
@ -777,6 +768,7 @@ pub struct Metadata {
pub struct PaymentsSessionRequest {
pub payment_id: String,
pub client_secret: String,
pub wallets: Vec<api_enums::SupportedWallets>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]