mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
fix(connector): [BOA/CYB] Fix Metadata Error (#3283)
This commit is contained in:
@ -1,5 +1,3 @@
|
|||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
use api_models::payments;
|
use api_models::payments;
|
||||||
use base64::Engine;
|
use base64::Engine;
|
||||||
use common_utils::pii;
|
use common_utils::pii;
|
||||||
@ -323,8 +321,9 @@ impl From<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
|
|||||||
|
|
||||||
impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
|
impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
|
||||||
fn foreign_from(metadata: Value) -> Self {
|
fn foreign_from(metadata: Value) -> Self {
|
||||||
let hashmap: HashMap<String, Value> =
|
let hashmap: std::collections::BTreeMap<String, Value> =
|
||||||
serde_json::from_str(&metadata.to_string()).unwrap_or(HashMap::new());
|
serde_json::from_str(&metadata.to_string())
|
||||||
|
.unwrap_or(std::collections::BTreeMap::new());
|
||||||
let mut vector: Self = Self::new();
|
let mut vector: Self = Self::new();
|
||||||
let mut iter = 1;
|
let mut iter = 1;
|
||||||
for (key, value) in hashmap {
|
for (key, value) in hashmap {
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
use api_models::payments;
|
use api_models::payments;
|
||||||
use base64::Engine;
|
use base64::Engine;
|
||||||
use common_utils::pii;
|
use common_utils::pii;
|
||||||
@ -543,8 +541,9 @@ fn build_bill_to(
|
|||||||
|
|
||||||
impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
|
impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
|
||||||
fn foreign_from(metadata: Value) -> Self {
|
fn foreign_from(metadata: Value) -> Self {
|
||||||
let hashmap: HashMap<String, Value> =
|
let hashmap: std::collections::BTreeMap<String, Value> =
|
||||||
serde_json::from_str(&metadata.to_string()).unwrap_or(HashMap::new());
|
serde_json::from_str(&metadata.to_string())
|
||||||
|
.unwrap_or(std::collections::BTreeMap::new());
|
||||||
let mut vector: Self = Self::new();
|
let mut vector: Self = Self::new();
|
||||||
let mut iter = 1;
|
let mut iter = 1;
|
||||||
for (key, value) in hashmap {
|
for (key, value) in hashmap {
|
||||||
|
|||||||
Reference in New Issue
Block a user