mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-12-09 15:28:47 +08:00
feat(core): add columns unified error code and error message in refund table (#6933)
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user