mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
feat(router): add domain types, admin core changes and other prerequisites for 3ds external authentication flow (#3962)
Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0aabd86e00
commit
4902c40345
@ -782,6 +782,8 @@ pub async fn create_payment_connector(
|
||||
|
||||
let pm_auth_connector =
|
||||
api_enums::convert_pm_auth_connector(req.connector_name.to_string().as_str());
|
||||
let authentication_connector =
|
||||
api_enums::convert_authentication_connector(req.connector_name.to_string().as_str());
|
||||
|
||||
if pm_auth_connector.is_some() {
|
||||
if req.connector_type != api_enums::ConnectorType::PaymentMethodAuth {
|
||||
@ -790,6 +792,13 @@ pub async fn create_payment_connector(
|
||||
})
|
||||
.into_report();
|
||||
}
|
||||
} else if authentication_connector.is_some() {
|
||||
if req.connector_type != api_enums::ConnectorType::AuthenticationProcessor {
|
||||
return Err(errors::ApiErrorResponse::InvalidRequestData {
|
||||
message: "Invalid connector type given".to_string(),
|
||||
})
|
||||
.into_report();
|
||||
}
|
||||
} else {
|
||||
let routable_connector_option = req
|
||||
.connector_name
|
||||
@ -1657,7 +1666,14 @@ pub async fn update_business_profile(
|
||||
applepay_verified_domains: request.applepay_verified_domains,
|
||||
payment_link_config,
|
||||
session_expiry: request.session_expiry.map(i64::from),
|
||||
authentication_connector_details: None,
|
||||
authentication_connector_details: request
|
||||
.authentication_connector_details
|
||||
.as_ref()
|
||||
.map(Encode::encode_to_value)
|
||||
.transpose()
|
||||
.change_context(errors::ApiErrorResponse::InvalidDataValue {
|
||||
field_name: "authentication_connector_details",
|
||||
})?,
|
||||
};
|
||||
|
||||
let updated_business_profile = db
|
||||
|
||||
Reference in New Issue
Block a user