feat(router): add payment method display name to feature matrix response (#7639)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
AkshayaFoiger
2025-04-01 17:11:15 +05:30
committed by GitHub
parent 506a68a71f
commit e8afec2f51
7 changed files with 701 additions and 31 deletions

View File

@ -131,8 +131,13 @@ fn build_payment_method_wise_feature_details(
)
});
let supported_countries =
payment_method_type_config.and_then(|config| config.country.clone());
let supported_countries = payment_method_type_config.and_then(|config| {
config.country.clone().map(|set| {
set.into_iter()
.map(common_enums::CountryAlpha2::from_alpha2_to_alpha3)
.collect::<std::collections::HashSet<_>>()
})
});
let supported_currencies =
payment_method_type_config.and_then(|config| config.currency.clone());
@ -140,6 +145,7 @@ fn build_payment_method_wise_feature_details(
feature_matrix::SupportedPaymentMethod {
payment_method,
payment_method_type: *payment_method_type,
payment_method_type_display_name: payment_method_type.to_display_name(),
mandates: feature_metadata.mandates,
refunds: feature_metadata.refunds,
supported_capture_methods: feature_metadata.supported_capture_methods.clone(),