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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(auth): change authentication data type annotation for profile create v2 (#10373)
Apoorv Dixit47ae5cbefd60
diff --git a/crates/router/src/routes/profile_acquirer.rs b/crates/router/src/routes/profile_acquirer.rsindex b8e5f83ba3..b2834c4a0a 100644--- a/crates/router/src/routes/profile_acquirer.rs+++ b/crates/router/src/routes/profile_acquirer.rs@@ -23,7 +23,7 @@ pub async fn create_profile_acquirer(state,&req,payload,- |state: super::SessionState, auth_data: auth::AuthenticationData, req, _| {+ |state: super::SessionState, auth_data, req, _| {let platform = auth_data.into();crate::core::profile_acquirer::create_profile_acquirer(state, req, platform)},@@ -62,7 +62,7 @@ pub async fn profile_acquirer_update(state,&req,payload,- |state: super::SessionState, auth_data: auth::AuthenticationData, req, _| {+ |state: super::SessionState, auth_data, req, _| {let platform = auth_data.into();crate::core::profile_acquirer::update_profile_acquirer_config(state,diff --git a/crates/router/src/routes/profiles.rs b/crates/router/src/routes/profiles.rsindex b15605e3a9..6b201fc1df 100644--- a/crates/router/src/routes/profiles.rs+++ b/crates/router/src/routes/profiles.rs@@ -81,8 +81,19 @@ pub async fn profile_create(state,&req,payload,- |state, auth: auth::AuthenticationData, req, _| {- let platform = auth.into();+ |state,+ auth::AuthenticationDataWithoutProfile {+ merchant_account,+ key_store,+ },+ req,+ _| {+ let platform = hyperswitch_domain_models::platform::Platform::new(+ merchant_account.clone(),+ key_store.clone(),+ merchant_account,+ key_store,+ );create_profile(state, req, platform)},auth::auth_type(