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

feat(router): Enable client_secret auth for payments_get_intent [v2] (#8119)

Anurag Thakur68b0e386d5c1
diff --git a/crates/router/src/routes/payments.rs b/crates/router/src/routes/payments.rs
index 36c8b727b5..2df62a36e1 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