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: populate meta_data in payment_intent (#1240)
SamraatBansal1ac3eb0a3603
diff --git a/crates/router/src/core/payments/operations/payment_create.rs b/crates/router/src/core/payments/operations/payment_create.rsindex edaa922df5..1d0ad7a37b 100644--- a/crates/router/src/core/payments/operations/payment_create.rs+++ b/crates/router/src/core/payments/operations/payment_create.rs@@ -3,6 +3,7 @@ use std::marker::PhantomData;use async_trait::async_trait;use common_utils::ext_traits::{AsyncExt, Encode, ValueExt};use error_stack::{self, ResultExt};+use masking::Secret;use router_derive::PaymentOperation;use router_env::{instrument, tracing};use storage_models::ephemeral_key;@@ -544,6 +545,7 @@ impl PaymentCreate {.transpose().change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("Encoding Metadata to value failed")?;+ let meta_data = metadata.clone().map(Secret::new);let (business_country, business_label) = helpers::get_business_details(request.business_country,@@ -573,6 +575,7 @@ impl PaymentCreate {business_country,business_label,active_attempt_id,+ meta_data,..storage::PaymentIntentNew::default()})}