mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
fix(core): fix merchant connector account create for v2 (#5716)
This commit is contained in:
@ -4179,16 +4179,19 @@ impl BusinessProfileWrapper {
|
|||||||
pub fn get_default_fallback_list_of_connector_under_profile(
|
pub fn get_default_fallback_list_of_connector_under_profile(
|
||||||
&self,
|
&self,
|
||||||
) -> RouterResult<Vec<routing_types::RoutableConnectorChoice>> {
|
) -> RouterResult<Vec<routing_types::RoutableConnectorChoice>> {
|
||||||
use masking::ExposeOptionInterface;
|
let fallback_connectors =
|
||||||
self.profile
|
if let Some(default_fallback_routing) = self.profile.default_fallback_routing.clone() {
|
||||||
.default_fallback_routing
|
default_fallback_routing
|
||||||
.clone()
|
.expose()
|
||||||
.expose_option()
|
|
||||||
.parse_value::<Vec<routing_types::RoutableConnectorChoice>>(
|
.parse_value::<Vec<routing_types::RoutableConnectorChoice>>(
|
||||||
"Vec<RoutableConnectorChoice>",
|
"Vec<RoutableConnectorChoice>",
|
||||||
)
|
)
|
||||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||||
.attach_printable("Merchant default config has invalid structure")
|
.attach_printable("Business Profile default config has invalid structure")?
|
||||||
|
} else {
|
||||||
|
Vec::new()
|
||||||
|
};
|
||||||
|
Ok(fallback_connectors)
|
||||||
}
|
}
|
||||||
pub fn get_default_routing_configs_from_profile(
|
pub fn get_default_routing_configs_from_profile(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
Reference in New Issue
Block a user