diff --git a/crates/router/src/connector/bankofamerica/transformers.rs b/crates/router/src/connector/bankofamerica/transformers.rs index def93ec5f83f..aa47efbe714f 100644 --- a/crates/router/src/connector/bankofamerica/transformers.rs +++ b/crates/router/src/connector/bankofamerica/transformers.rs @@ -1,5 +1,3 @@ -use std::collections::HashMap; - use api_models::payments; use base64::Engine; use common_utils::pii; @@ -323,8 +321,9 @@ impl From<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>> impl ForeignFrom for Vec { fn foreign_from(metadata: Value) -> Self { - let hashmap: HashMap = - serde_json::from_str(&metadata.to_string()).unwrap_or(HashMap::new()); + let hashmap: std::collections::BTreeMap = + serde_json::from_str(&metadata.to_string()) + .unwrap_or(std::collections::BTreeMap::new()); let mut vector: Self = Self::new(); let mut iter = 1; for (key, value) in hashmap { diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs index cf769f1a2fde..e6034f7af7f7 100644 --- a/crates/router/src/connector/cybersource/transformers.rs +++ b/crates/router/src/connector/cybersource/transformers.rs @@ -1,5 +1,3 @@ -use std::collections::HashMap; - use api_models::payments; use base64::Engine; use common_utils::pii; @@ -543,8 +541,9 @@ fn build_bill_to( impl ForeignFrom for Vec { fn foreign_from(metadata: Value) -> Self { - let hashmap: HashMap = - serde_json::from_str(&metadata.to_string()).unwrap_or(HashMap::new()); + let hashmap: std::collections::BTreeMap = + serde_json::from_str(&metadata.to_string()) + .unwrap_or(std::collections::BTreeMap::new()); let mut vector: Self = Self::new(); let mut iter = 1; for (key, value) in hashmap {