Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(router): add new api endpoint for post authentication sync in modular authentication (#9615)

Sai Harsha Vardhan55360388f4a7
diff --git a/crates/router/src/core/unified_authentication_service.rs b/crates/router/src/core/unified_authentication_service.rs
index 8c7086b7fd..49ca215ba8 100644
--- a/crates/router/src/core/unified_authentication_service.rs
+++ b/crates/router/src/core/unified_authentication_service.rs
@@ -943,7 +943,7 @@ pub async fn authentication_eligibility_core(
let notification_url = match authentication_connector {
common_enums::AuthenticationConnectors::Juspaythreedsserver => {
Some(url::Url::parse(&format!(
- "{base_url}/authentication/{merchant_id}/{authentication_id}/sync",
+ "{base_url}/authentication/{merchant_id}/{authentication_id}/redirect",
base_url = state.base_url,
merchant_id = merchant_id.get_string_repr(),
authentication_id = authentication_id.get_string_repr()
diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rs
index acbb7b6072..341af8bc16 100644
--- a/crates/router/src/routes/app.rs
+++ b/crates/router/src/routes/app.rs
@@ -2982,10 +2982,13 @@ impl Authentication {
web::resource("/{authentication_id}/authenticate")
.route(web::post().to(authentication::authentication_authenticate)),
)
+ .service(
+ web::resource("{merchant_id}/{authentication_id}/redirect")
+ .route(web::post().to(authentication::authentication_sync_post_update)),
+ )
.service(
web::resource("{merchant_id}/{authentication_id}/sync")
- .route(web::post().to(authentication::authentication_sync))
- .route(web::get().to(authentication::authentication_sync_post_update)),
+ .route(web::post().to(authentication::authentication_sync)),
)
}
}