@@ -1600,6 +1600,7 @@ mod payment_method_data_serde {
1600
1600
| PaymentMethodData :: Voucher ( _)
1601
1601
| PaymentMethodData :: Card ( _)
1602
1602
| PaymentMethodData :: MandatePayment
1603
+ | PaymentMethodData :: OpenBanking ( _)
1603
1604
| PaymentMethodData :: Wallet ( _) => {
1604
1605
payment_method_data_request. serialize ( serializer)
1605
1606
}
@@ -1657,6 +1658,8 @@ pub enum PaymentMethodData {
1657
1658
GiftCard ( Box < GiftCardData > ) ,
1658
1659
#[ schema( title = "CardToken" ) ]
1659
1660
CardToken ( CardToken ) ,
1661
+ #[ schema( title = "OpenBanking" ) ]
1662
+ OpenBanking ( OpenBankingData ) ,
1660
1663
}
1661
1664
1662
1665
pub trait GetAddressFromPaymentMethodData {
@@ -1680,6 +1683,7 @@ impl GetAddressFromPaymentMethodData for PaymentMethodData {
1680
1683
| Self :: Upi ( _)
1681
1684
| Self :: GiftCard ( _)
1682
1685
| Self :: CardToken ( _)
1686
+ | Self :: OpenBanking ( _)
1683
1687
| Self :: MandatePayment => None ,
1684
1688
}
1685
1689
}
@@ -1717,6 +1721,7 @@ impl PaymentMethodData {
1717
1721
Self :: Upi ( _) => Some ( api_enums:: PaymentMethod :: Upi ) ,
1718
1722
Self :: Voucher ( _) => Some ( api_enums:: PaymentMethod :: Voucher ) ,
1719
1723
Self :: GiftCard ( _) => Some ( api_enums:: PaymentMethod :: GiftCard ) ,
1724
+ Self :: OpenBanking ( _) => Some ( api_enums:: PaymentMethod :: OpenBanking ) ,
1720
1725
Self :: CardToken ( _) | Self :: MandatePayment => None ,
1721
1726
}
1722
1727
}
@@ -1785,6 +1790,14 @@ impl GetPaymentMethodType for PayLaterData {
1785
1790
}
1786
1791
}
1787
1792
1793
+ impl GetPaymentMethodType for OpenBankingData {
1794
+ fn get_payment_method_type ( & self ) -> api_enums:: PaymentMethodType {
1795
+ match self {
1796
+ Self :: OpenBankingPIS { } => api_enums:: PaymentMethodType :: OpenBankingPIS ,
1797
+ }
1798
+ }
1799
+ }
1800
+
1788
1801
impl GetPaymentMethodType for BankRedirectData {
1789
1802
fn get_payment_method_type ( & self ) -> api_enums:: PaymentMethodType {
1790
1803
match self {
@@ -1983,6 +1996,7 @@ pub enum AdditionalPaymentData {
1983
1996
Voucher { } ,
1984
1997
CardRedirect { } ,
1985
1998
CardToken { } ,
1999
+ OpenBanking { } ,
1986
2000
}
1987
2001
1988
2002
#[ derive( Debug , Clone , Eq , PartialEq , serde:: Deserialize , serde:: Serialize ) ]
@@ -2673,6 +2687,12 @@ pub struct SamsungPayWalletData {
2673
2687
pub token : Secret < String > ,
2674
2688
}
2675
2689
2690
+ #[ derive( Eq , PartialEq , Clone , Debug , serde:: Deserialize , serde:: Serialize , ToSchema ) ]
2691
+ #[ serde( rename_all = "snake_case" ) ]
2692
+ pub enum OpenBankingData {
2693
+ #[ serde( rename = "open_banking_pis" ) ]
2694
+ OpenBankingPIS { } ,
2695
+ }
2676
2696
#[ derive( Eq , PartialEq , Clone , Debug , serde:: Deserialize , serde:: Serialize , ToSchema ) ]
2677
2697
#[ serde( rename_all = "snake_case" ) ]
2678
2698
pub struct GooglePayWalletData {
@@ -2946,6 +2966,7 @@ where
2946
2966
| PaymentMethodDataResponse :: Upi { }
2947
2967
| PaymentMethodDataResponse :: Wallet { }
2948
2968
| PaymentMethodDataResponse :: BankTransfer { }
2969
+ | PaymentMethodDataResponse :: OpenBanking { }
2949
2970
| PaymentMethodDataResponse :: Voucher { } => {
2950
2971
payment_method_data_response. serialize ( serializer)
2951
2972
}
@@ -2979,6 +3000,7 @@ pub enum PaymentMethodDataResponse {
2979
3000
GiftCard { } ,
2980
3001
CardRedirect { } ,
2981
3002
CardToken { } ,
3003
+ OpenBanking { } ,
2982
3004
}
2983
3005
2984
3006
#[ derive( Eq , PartialEq , Clone , Debug , serde:: Serialize , serde:: Deserialize , ToSchema ) ]
@@ -4146,6 +4168,7 @@ impl From<AdditionalPaymentData> for PaymentMethodDataResponse {
4146
4168
AdditionalPaymentData :: GiftCard { } => Self :: GiftCard { } ,
4147
4169
AdditionalPaymentData :: CardRedirect { } => Self :: CardRedirect { } ,
4148
4170
AdditionalPaymentData :: CardToken { } => Self :: CardToken { } ,
4171
+ AdditionalPaymentData :: OpenBanking { } => Self :: OpenBanking { } ,
4149
4172
}
4150
4173
}
4151
4174
}
@@ -4531,6 +4554,8 @@ pub enum SessionToken {
4531
4554
Paypal ( Box < PaypalSessionTokenResponse > ) ,
4532
4555
/// The session response structure for Apple Pay
4533
4556
ApplePay ( Box < ApplepaySessionTokenResponse > ) ,
4557
+ /// Session token for OpenBanking PIS flow
4558
+ OpenBanking ( OpenBankingSessionToken ) ,
4534
4559
/// Whenever there is no session token response or an error in session response
4535
4560
NoSessionTokenReceived ,
4536
4561
}
@@ -4607,6 +4632,13 @@ pub struct PaypalSessionTokenResponse {
4607
4632
pub sdk_next_action : SdkNextAction ,
4608
4633
}
4609
4634
4635
+ #[ derive( Debug , Clone , Eq , PartialEq , serde:: Serialize , ToSchema ) ]
4636
+ #[ serde( rename_all = "lowercase" ) ]
4637
+ pub struct OpenBankingSessionToken {
4638
+ /// The session token for OpenBanking Connectors
4639
+ pub open_banking_session_token : String ,
4640
+ }
4641
+
4610
4642
#[ derive( Debug , Clone , Eq , PartialEq , serde:: Serialize , ToSchema ) ]
4611
4643
#[ serde( rename_all = "lowercase" ) ]
4612
4644
pub struct ApplepaySessionTokenResponse {
0 commit comments