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(payment_methods): add prefix to payment method sessions routes (#11142)

Gaurav Rawat81d93c2201d1
diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rs
index b64de01c87..09639f5698 100644
--- a/crates/router/src/routes/app.rs
+++ b/crates/router/src/routes/app.rs
@@ -1737,7 +1737,11 @@ pub struct PaymentMethodSession;
#[cfg(all(feature = "v2", feature = "oltp"))]
impl PaymentMethodSession {
pub fn server(state: AppState) -> Scope {
- let mut route = web::scope("/v2/payment-method-sessions").app_data(web::Data::new(state));
+ let base_path = format!(
+ "/{}/payment-method-sessions",
+ state.conf.micro_services.payment_methods_prefix.0
+ );
+ let mut route = web::scope(&base_path).app_data(web::Data::new(state));
route = route.service(
web::resource("")
.route(web::post().to(payment_methods::payment_methods_session_create)),