feat(core): add columns unified error code and error message in refund table (#6933)

This commit is contained in:
Debarati Ghatak
2025-01-07 13:01:17 +05:30
committed by GitHub
parent 6b1e5b0aec
commit c4d36b506e
30 changed files with 237 additions and 166 deletions

View File

@@ -55,9 +55,10 @@ use crate::{
errors::{self, CustomResult, RouterResult, StorageErrorExt},
payments as payments_core,
},
headers::ACCEPT_LANGUAGE,
logger,
routes::{metrics, SessionState},
services,
services::{self, authentication::get_header_value_by_key},
types::{
self, domain,
transformers::{ForeignFrom, ForeignInto},
@@ -1324,3 +1325,11 @@ pub async fn trigger_refund_outgoing_webhook(
) -> RouterResult<()> {
todo!()
}
pub fn get_locale_from_header(headers: &actix_web::http::header::HeaderMap) -> String {
get_header_value_by_key(ACCEPT_LANGUAGE.into(), headers)
.ok()
.flatten()
.map(|val| val.to_string())
.unwrap_or(common_utils::consts::DEFAULT_LOCALE.to_string())
}