@@ -917,41 +917,12 @@ pub trait AccessTokenRequestInfo {
917
917
fn get_request_id ( & self ) -> Result < Secret < String > , Error > ;
918
918
}
919
919
920
- impl WalletData for hyperswitch_domain_models:: payment_method_data:: WalletData {
921
- fn get_wallet_token ( & self ) -> Result < Secret < String > , Error > {
922
- match self {
923
- Self :: GooglePay ( data) => Ok ( Secret :: new ( data. tokenization_data . token . clone ( ) ) ) ,
924
- Self :: ApplePay ( data) => Ok ( data. get_applepay_decoded_payment_data ( ) ?) ,
925
- Self :: PaypalSdk ( data) => Ok ( Secret :: new ( data. token . clone ( ) ) ) ,
926
- _ => Err ( errors:: ConnectorError :: InvalidWallet . into ( ) ) ,
927
- }
928
- }
929
- fn get_wallet_token_as_json < T > ( & self , wallet_name : String ) -> Result < T , Error >
930
- where
931
- T : serde:: de:: DeserializeOwned ,
932
- {
933
- serde_json:: from_str :: < T > ( self . get_wallet_token ( ) ?. peek ( ) )
934
- . change_context ( errors:: ConnectorError :: InvalidWalletToken { wallet_name } )
935
- }
936
- }
937
-
938
- pub trait ApplePay {
939
- fn get_applepay_decoded_payment_data ( & self ) -> Result < Secret < String > , Error > ;
940
- }
941
-
942
- impl ApplePay for ApplePayWalletData {
943
- fn get_applepay_decoded_payment_data ( & self ) -> Result < Secret < String > , Error > {
944
- let token = Secret :: new (
945
- String :: from_utf8 ( BASE64_ENGINE . decode ( & self . payment_data ) . change_context (
946
- errors:: ConnectorError :: InvalidWalletToken {
947
- wallet_name : "Apple Pay" . to_string ( ) ,
948
- } ,
949
- ) ?)
950
- . change_context ( errors:: ConnectorError :: InvalidWalletToken {
951
- wallet_name : "Apple Pay" . to_string ( ) ,
952
- } ) ?,
953
- ) ;
954
- Ok ( token)
920
+ impl AccessTokenRequestInfo for RefreshTokenRouterData {
921
+ fn get_request_id ( & self ) -> Result < Secret < String > , Error > {
922
+ self . request
923
+ . id
924
+ . clone ( )
925
+ . ok_or_else ( missing_field_err ( "request.id" ) )
955
926
}
956
927
}
957
928
@@ -1844,6 +1815,7 @@ pub enum PaymentMethodDataType {
1844
1815
MobilePayRedirect ,
1845
1816
PaypalRedirect ,
1846
1817
PaypalSdk ,
1818
+ Paze ,
1847
1819
SamsungPay ,
1848
1820
TwintRedirect ,
1849
1821
VippsRedirect ,
@@ -1923,13 +1895,15 @@ pub enum PaymentMethodDataType {
1923
1895
VietQr ,
1924
1896
OpenBanking ,
1925
1897
NetworkToken ,
1898
+ NetworkTransactionIdAndCardDetails ,
1926
1899
}
1927
1900
1928
1901
impl From < PaymentMethodData > for PaymentMethodDataType {
1929
1902
fn from ( pm_data : PaymentMethodData ) -> Self {
1930
1903
match pm_data {
1931
1904
PaymentMethodData :: Card ( _) => Self :: Card ,
1932
1905
PaymentMethodData :: NetworkToken ( _) => Self :: NetworkToken ,
1906
+ PaymentMethodData :: CardDetailsForNetworkTransactionId ( _) => Self :: NetworkTransactionIdAndCardDetails ,
1933
1907
PaymentMethodData :: CardRedirect ( card_redirect_data) => {
1934
1908
match card_redirect_data {
1935
1909
hyperswitch_domain_models:: payment_method_data:: CardRedirectData :: Knet { } => Self :: Knet ,
@@ -1961,6 +1935,7 @@ impl From<PaymentMethodData> for PaymentMethodDataType {
1961
1935
hyperswitch_domain_models:: payment_method_data:: WalletData :: MobilePayRedirect ( _) => Self :: MobilePayRedirect ,
1962
1936
hyperswitch_domain_models:: payment_method_data:: WalletData :: PaypalRedirect ( _) => Self :: PaypalRedirect ,
1963
1937
hyperswitch_domain_models:: payment_method_data:: WalletData :: PaypalSdk ( _) => Self :: PaypalSdk ,
1938
+ hyperswitch_domain_models:: payment_method_data:: WalletData :: Paze ( _) => Self :: Paze ,
1964
1939
hyperswitch_domain_models:: payment_method_data:: WalletData :: SamsungPay ( _) => Self :: SamsungPay ,
1965
1940
hyperswitch_domain_models:: payment_method_data:: WalletData :: TwintRedirect { } => Self :: TwintRedirect ,
1966
1941
hyperswitch_domain_models:: payment_method_data:: WalletData :: VippsRedirect { } => Self :: VippsRedirect ,
0 commit comments