feat(payout_link): add localisation support for payout link's templates (#5552)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Kashif
2024-08-12 13:12:54 +05:30
committed by GitHub
parent f9c29b084b
commit b0346e08f4
40 changed files with 1077 additions and 84 deletions

View File

@ -12,7 +12,7 @@ pub use api_models::enums::Connector;
use api_models::payment_methods;
#[cfg(feature = "payouts")]
pub use api_models::{enums::PayoutConnectors, payouts as payout_types};
use common_utils::{ext_traits::Encode, id_type::CustomerId};
use common_utils::{consts::DEFAULT_LOCALE, ext_traits::Encode, id_type::CustomerId};
use diesel_models::{
enums, GenericLinkNew, PaymentMethodCollectLink, PaymentMethodCollectLinkData,
};
@ -251,6 +251,7 @@ pub async fn render_pm_collect_link(
GenericLinks {
allowed_domains: HashSet::from([]),
data: GenericLinksData::ExpiredLink(expired_link_data),
locale: DEFAULT_LOCALE.to_string(),
},
)))
@ -312,8 +313,8 @@ pub async fn render_pm_collect_link(
Ok(services::ApplicationResponse::GenericLinkForm(Box::new(
GenericLinks {
allowed_domains: HashSet::from([]),
data: GenericLinksData::PaymentMethodCollect(generic_form_data),
locale: DEFAULT_LOCALE.to_string(),
},
)))
}
@ -357,8 +358,8 @@ pub async fn render_pm_collect_link(
Ok(services::ApplicationResponse::GenericLinkForm(Box::new(
GenericLinks {
allowed_domains: HashSet::from([]),
data: GenericLinksData::PaymentMethodCollectStatus(generic_status_data),
locale: DEFAULT_LOCALE.to_string(),
},
)))
}