@@ -23,7 +23,10 @@ impl TryFrom<(&types::TokenizationRouterData, BankDebitData)> for SquareTokenReq
23
23
"Payment Method" . to_string ( ) ,
24
24
) )
25
25
. into_report ( ) ,
26
- _ => Err ( errors:: ConnectorError :: NotSupported {
26
+
27
+ BankDebitData :: SepaBankDebit { .. }
28
+ | BankDebitData :: BecsBankDebit { .. }
29
+ | BankDebitData :: BacsBankDebit { .. } => Err ( errors:: ConnectorError :: NotSupported {
27
30
message : format ! ( "{:?}" , item. request. payment_method_data) ,
28
31
connector : "Square" ,
29
32
} ) ?,
@@ -85,7 +88,14 @@ impl TryFrom<(&types::TokenizationRouterData, PayLaterData)> for SquareTokenRequ
85
88
errors:: ConnectorError :: NotImplemented ( "Payment Method" . to_string ( ) ) ,
86
89
)
87
90
. into_report ( ) ,
88
- _ => Err ( errors:: ConnectorError :: NotSupported {
91
+
92
+ PayLaterData :: KlarnaRedirect { .. }
93
+ | PayLaterData :: KlarnaSdk { .. }
94
+ | PayLaterData :: AffirmRedirect { .. }
95
+ | PayLaterData :: PayBrightRedirect { .. }
96
+ | PayLaterData :: WalleyRedirect { .. }
97
+ | PayLaterData :: AlmaRedirect { .. }
98
+ | PayLaterData :: AtomeRedirect { .. } => Err ( errors:: ConnectorError :: NotSupported {
89
99
message : format ! ( "{:?}" , item. request. payment_method_data) ,
90
100
connector : "Square" ,
91
101
} ) ?,
@@ -106,7 +116,31 @@ impl TryFrom<(&types::TokenizationRouterData, WalletData)> for SquareTokenReques
106
116
"Payment Method" . to_string ( ) ,
107
117
) )
108
118
. into_report ( ) ,
109
- _ => Err ( errors:: ConnectorError :: NotSupported {
119
+
120
+ WalletData :: AliPayQr ( _)
121
+ | WalletData :: AliPayRedirect ( _)
122
+ | WalletData :: AliPayHkRedirect ( _)
123
+ | WalletData :: MomoRedirect ( _)
124
+ | WalletData :: KakaoPayRedirect ( _)
125
+ | WalletData :: GoPayRedirect ( _)
126
+ | WalletData :: GcashRedirect ( _)
127
+ | WalletData :: ApplePayRedirect ( _)
128
+ | WalletData :: ApplePayThirdPartySdk ( _)
129
+ | WalletData :: DanaRedirect { }
130
+ | WalletData :: GooglePayRedirect ( _)
131
+ | WalletData :: GooglePayThirdPartySdk ( _)
132
+ | WalletData :: MbWayRedirect ( _)
133
+ | WalletData :: MobilePayRedirect ( _)
134
+ | WalletData :: PaypalRedirect ( _)
135
+ | WalletData :: PaypalSdk ( _)
136
+ | WalletData :: SamsungPay ( _)
137
+ | WalletData :: TwintRedirect { }
138
+ | WalletData :: VippsRedirect { }
139
+ | WalletData :: TouchNGoRedirect ( _)
140
+ | WalletData :: WeChatPayRedirect ( _)
141
+ | WalletData :: WeChatPayQr ( _)
142
+ | WalletData :: CashappQr ( _)
143
+ | WalletData :: SwishQr ( _) => Err ( errors:: ConnectorError :: NotSupported {
110
144
message : format ! ( "{:?}" , item. request. payment_method_data) ,
111
145
connector : "Square" ,
112
146
} ) ?,
@@ -295,7 +329,14 @@ impl TryFrom<&types::ConnectorAuthType> for SquareAuthType {
295
329
api_key : api_key. to_owned ( ) ,
296
330
key1 : key1. to_owned ( ) ,
297
331
} ) ,
298
- _ => Err ( errors:: ConnectorError :: FailedToObtainAuthType . into ( ) ) ,
332
+
333
+ types:: ConnectorAuthType :: HeaderKey { .. }
334
+ | types:: ConnectorAuthType :: SignatureKey { .. }
335
+ | types:: ConnectorAuthType :: MultiAuthKey { .. }
336
+ | types:: ConnectorAuthType :: CurrencyAuthKey { .. }
337
+ | types:: ConnectorAuthType :: NoKey { .. } => {
338
+ Err ( errors:: ConnectorError :: FailedToObtainAuthType . into ( ) )
339
+ }
299
340
}
300
341
}
301
342
}
0 commit comments