From 72c3950e0101e5928249a2ba4383e03417437d51 Mon Sep 17 00:00:00 2001 From: Anurag Thakur Date: Fri, 23 May 2025 14:07:43 +0530 Subject: [PATCH] feat(router): Enable client_secret auth for payments_get_intent [v2] --- crates/router/src/routes/payments.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/router/src/routes/payments.rs b/crates/router/src/routes/payments.rs index 36c8b727b5a..2df62a36e17 100644 --- a/crates/router/src/routes/payments.rs +++ b/crates/router/src/routes/payments.rs @@ -232,10 +232,16 @@ pub async fn payments_get_intent( header_payload.clone(), ) }, - &auth::V2ApiKeyAuth { - is_connected_allowed: false, - is_platform_allowed: false, - }, + auth::api_or_client_auth( + &auth::V2ApiKeyAuth { + is_connected_allowed: false, + is_platform_allowed: false, + }, + &auth::V2ClientAuth(common_utils::types::authentication::ResourceId::Payment( + global_payment_id.clone(), + )), + req.headers(), + ), api_locking::LockAction::NotApplicable, )) .await