@@ -37,11 +37,14 @@ impl TryFrom<utils::CardIssuer> for PayeezyCardType {
37
37
utils:: CardIssuer :: Master => Ok ( Self :: Mastercard ) ,
38
38
utils:: CardIssuer :: Discover => Ok ( Self :: Discover ) ,
39
39
utils:: CardIssuer :: Visa => Ok ( Self :: Visa ) ,
40
- _ => Err ( errors:: ConnectorError :: NotSupported {
41
- message : issuer. to_string ( ) ,
42
- connector : "Payeezy" ,
40
+
41
+ utils:: CardIssuer :: Maestro | utils:: CardIssuer :: DinersClub | utils:: CardIssuer :: JCB => {
42
+ Err ( errors:: ConnectorError :: NotSupported {
43
+ message : utils:: SELECTED_PAYMENT_METHOD . to_string ( ) ,
44
+ connector : "Payeezy" ,
45
+ }
46
+ . into ( ) )
43
47
}
44
- . into ( ) ) ,
45
48
}
46
49
}
47
50
}
@@ -97,7 +100,20 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PayeezyPaymentsRequest {
97
100
fn try_from ( item : & types:: PaymentsAuthorizeRouterData ) -> Result < Self , Self :: Error > {
98
101
match item. payment_method {
99
102
diesel_models:: enums:: PaymentMethod :: Card => get_card_specific_payment_data ( item) ,
100
- _ => Err ( errors:: ConnectorError :: NotImplemented ( "Payment methods" . to_string ( ) ) . into ( ) ) ,
103
+
104
+ diesel_models:: enums:: PaymentMethod :: CardRedirect
105
+ | diesel_models:: enums:: PaymentMethod :: PayLater
106
+ | diesel_models:: enums:: PaymentMethod :: Wallet
107
+ | diesel_models:: enums:: PaymentMethod :: BankRedirect
108
+ | diesel_models:: enums:: PaymentMethod :: BankTransfer
109
+ | diesel_models:: enums:: PaymentMethod :: Crypto
110
+ | diesel_models:: enums:: PaymentMethod :: BankDebit
111
+ | diesel_models:: enums:: PaymentMethod :: Reward
112
+ | diesel_models:: enums:: PaymentMethod :: Upi
113
+ | diesel_models:: enums:: PaymentMethod :: Voucher
114
+ | diesel_models:: enums:: PaymentMethod :: GiftCard => {
115
+ Err ( errors:: ConnectorError :: NotImplemented ( "Payment methods" . to_string ( ) ) . into ( ) )
116
+ }
101
117
}
102
118
}
103
119
}
@@ -165,7 +181,10 @@ fn get_transaction_type_and_stored_creds(
165
181
Some ( diesel_models:: enums:: CaptureMethod :: Automatic ) => {
166
182
Ok ( ( PayeezyTransactionType :: Purchase , None ) )
167
183
}
168
- _ => Err ( errors:: ConnectorError :: FlowNotSupported {
184
+
185
+ Some ( diesel_models:: enums:: CaptureMethod :: ManualMultiple )
186
+ | Some ( diesel_models:: enums:: CaptureMethod :: Scheduled )
187
+ | None => Err ( errors:: ConnectorError :: FlowNotSupported {
169
188
flow : item. request . capture_method . unwrap_or_default ( ) . to_string ( ) ,
170
189
connector : "Payeezy" . to_string ( ) ,
171
190
} ) ,
@@ -196,7 +215,23 @@ fn get_payment_method_data(
196
215
} ;
197
216
Ok ( PayeezyPaymentMethod :: PayeezyCard ( payeezy_card) )
198
217
}
199
- _ => Err ( errors:: ConnectorError :: NotImplemented ( "Payment methods" . to_string ( ) ) . into ( ) ) ,
218
+
219
+ api:: PaymentMethodData :: CardRedirect ( _)
220
+ | api:: PaymentMethodData :: Wallet ( _)
221
+ | api:: PaymentMethodData :: PayLater ( _)
222
+ | api:: PaymentMethodData :: BankRedirect ( _)
223
+ | api:: PaymentMethodData :: BankDebit ( _)
224
+ | api:: PaymentMethodData :: BankTransfer ( _)
225
+ | api:: PaymentMethodData :: Crypto ( _)
226
+ | api:: PaymentMethodData :: MandatePayment
227
+ | api:: PaymentMethodData :: Reward
228
+ | api:: PaymentMethodData :: Upi ( _)
229
+ | api:: PaymentMethodData :: Voucher ( _)
230
+ | api:: PaymentMethodData :: GiftCard ( _) => Err ( errors:: ConnectorError :: NotSupported {
231
+ message : utils:: SELECTED_PAYMENT_METHOD . to_string ( ) ,
232
+ connector : "Payeezy" ,
233
+ }
234
+ . into ( ) ) ,
200
235
}
201
236
}
202
237
@@ -383,15 +418,15 @@ impl ForeignFrom<(PayeezyPaymentStatus, PayeezyTransactionType)> for enums::Atte
383
418
| PayeezyTransactionType :: Purchase
384
419
| PayeezyTransactionType :: Recurring => Self :: Charged ,
385
420
PayeezyTransactionType :: Void => Self :: Voided ,
386
- _ => Self :: Pending ,
421
+ PayeezyTransactionType :: Refund | PayeezyTransactionType :: Pending => Self :: Pending ,
387
422
} ,
388
423
PayeezyPaymentStatus :: Declined | PayeezyPaymentStatus :: NotProcessed => match method {
389
424
PayeezyTransactionType :: Capture => Self :: CaptureFailed ,
390
425
PayeezyTransactionType :: Authorize
391
426
| PayeezyTransactionType :: Purchase
392
427
| PayeezyTransactionType :: Recurring => Self :: AuthorizationFailed ,
393
428
PayeezyTransactionType :: Void => Self :: VoidFailed ,
394
- _ => Self :: Pending ,
429
+ PayeezyTransactionType :: Refund | PayeezyTransactionType :: Pending => Self :: Pending ,
395
430
} ,
396
431
}
397
432
}
0 commit comments