mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +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(
|
||||
&self,
|
||||
) -> RouterResult<Vec<routing_types::RoutableConnectorChoice>> {
|
||||
use masking::ExposeOptionInterface;
|
||||
self.profile
|
||||
.default_fallback_routing
|
||||
.clone()
|
||||
.expose_option()
|
||||
.parse_value::<Vec<routing_types::RoutableConnectorChoice>>(
|
||||
"Vec<RoutableConnectorChoice>",
|
||||
)
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("Merchant default config has invalid structure")
|
||||
let fallback_connectors =
|
||||
if let Some(default_fallback_routing) = self.profile.default_fallback_routing.clone() {
|
||||
default_fallback_routing
|
||||
.expose()
|
||||
.parse_value::<Vec<routing_types::RoutableConnectorChoice>>(
|
||||
"Vec<RoutableConnectorChoice>",
|
||||
)
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("Business Profile default config has invalid structure")?
|
||||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
Ok(fallback_connectors)
|
||||
}
|
||||
pub fn get_default_routing_configs_from_profile(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user