File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
crates/router/src/core/payment_methods Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2356,15 +2356,27 @@ fn filter_pm_based_on_config<'a>(
2356
2356
. or_else ( || config. 0 . get ( "default" ) )
2357
2357
. and_then ( |inner| match payment_method_type {
2358
2358
api_enums:: PaymentMethodType :: Credit | api_enums:: PaymentMethodType :: Debit => {
2359
+ let country_currency_filter = inner
2360
+ . 0
2361
+ . get ( & settings:: PaymentMethodFilterKey :: PaymentMethodType (
2362
+ * payment_method_type,
2363
+ ) )
2364
+ . map ( |value| global_country_currency_filter ( value, country, currency) ) ;
2365
+
2359
2366
card_network_filter ( country, currency, card_network, inner) ;
2360
2367
2361
- payment_attempt
2368
+ let capture_method_filter = payment_attempt
2362
2369
. and_then ( |inner| inner. capture_method )
2363
2370
. and_then ( |capture_method| {
2364
2371
( capture_method == storage_enums:: CaptureMethod :: Manual ) . then ( || {
2365
2372
filter_pm_based_on_capture_method_used ( inner, payment_method_type)
2366
2373
} )
2367
- } )
2374
+ } ) ;
2375
+
2376
+ Some (
2377
+ country_currency_filter. unwrap_or ( true )
2378
+ && capture_method_filter. unwrap_or ( true ) ,
2379
+ )
2368
2380
}
2369
2381
payment_method_type => inner
2370
2382
. 0
You can’t perform that action at this time.
0 commit comments