mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
add new field to send connector metadata
This commit is contained in:
@ -202,6 +202,16 @@ impl
|
|||||||
.collect::<HashMap<String, String>>()
|
.collect::<HashMap<String, String>>()
|
||||||
})
|
})
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
|
account_metadata: router_data
|
||||||
|
.connector_meta_data
|
||||||
|
.as_ref()
|
||||||
|
.and_then(|meta| meta.peek().as_object())
|
||||||
|
.map(|map| {
|
||||||
|
map.iter()
|
||||||
|
.filter_map(|(k, v)| v.as_str().map(|s| (k.clone(), s.to_string())))
|
||||||
|
.collect::<HashMap<String, String>>()
|
||||||
|
})
|
||||||
|
.unwrap_or_default(),
|
||||||
test_mode: None,
|
test_mode: None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -332,6 +342,16 @@ impl
|
|||||||
.collect::<HashMap<String, String>>()
|
.collect::<HashMap<String, String>>()
|
||||||
})
|
})
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
|
account_metadata: router_data
|
||||||
|
.connector_meta_data
|
||||||
|
.as_ref()
|
||||||
|
.and_then(|meta| meta.peek().as_object())
|
||||||
|
.map(|map| {
|
||||||
|
map.iter()
|
||||||
|
.filter_map(|(k, v)| v.as_str().map(|s| (k.clone(), s.to_string())))
|
||||||
|
.collect::<HashMap<String, String>>()
|
||||||
|
})
|
||||||
|
.unwrap_or_default(),
|
||||||
test_mode: None,
|
test_mode: None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -439,6 +459,16 @@ impl
|
|||||||
customer_acceptance,
|
customer_acceptance,
|
||||||
browser_info,
|
browser_info,
|
||||||
payment_experience: None,
|
payment_experience: None,
|
||||||
|
account_metadata: router_data
|
||||||
|
.connector_meta_data
|
||||||
|
.as_ref()
|
||||||
|
.and_then(|meta| meta.peek().as_object())
|
||||||
|
.map(|map| {
|
||||||
|
map.iter()
|
||||||
|
.filter_map(|(k, v)| v.as_str().map(|s| (k.clone(), s.to_string())))
|
||||||
|
.collect::<HashMap<String, String>>()
|
||||||
|
})
|
||||||
|
.unwrap_or_default(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -510,6 +540,16 @@ impl
|
|||||||
.collect::<HashMap<String, String>>()
|
.collect::<HashMap<String, String>>()
|
||||||
})
|
})
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
|
account_metadata: router_data
|
||||||
|
.connector_meta_data
|
||||||
|
.as_ref()
|
||||||
|
.and_then(|meta| meta.peek().as_object())
|
||||||
|
.map(|map| {
|
||||||
|
map.iter()
|
||||||
|
.filter_map(|(k, v)| v.as_str().map(|s| (k.clone(), s.to_string())))
|
||||||
|
.collect::<HashMap<String, String>>()
|
||||||
|
})
|
||||||
|
.unwrap_or_default(),
|
||||||
webhook_url: router_data.request.webhook_url.clone(),
|
webhook_url: router_data.request.webhook_url.clone(),
|
||||||
capture_method: capture_method.map(|capture_method| capture_method.into()),
|
capture_method: capture_method.map(|capture_method| capture_method.into()),
|
||||||
email: router_data
|
email: router_data
|
||||||
|
|||||||
Reference in New Issue
Block a user