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(merchant_account_v2): remove compatible_connector field in metadata (#5935)
Narayan Bhat8c99db72adbd
diff --git a/crates/api_models/src/admin.rs b/crates/api_models/src/admin.rsindex 1846ef0e45..3b9a8e1c98 100644--- a/crates/api_models/src/admin.rs+++ b/crates/api_models/src/admin.rs@@ -188,7 +188,7 @@ pub struct MerchantAccountCreate {/// Metadata is useful for storing additional, unstructured information about the merchant account.#[schema(value_type = Option<Object>, example = r#"{ "city": "NY", "unit": "245" }"#)]- pub metadata: Option<MerchantAccountMetadata>,+ pub metadata: Option<pii::SecretSerdeValue>,/// The id of the organization to which the merchant belongs to. Please use the organization endpoint to create an organization#[schema(value_type = String, max_length = 64, min_length = 1, example = "org_q98uSGAYbjEwqs0mJwnz")]@@ -210,15 +210,6 @@ impl MerchantAccountCreate {.transpose()}- pub fn get_metadata_as_secret(- &self,- ) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> {- self.metadata- .as_ref()- .map(|metadata| metadata.encode_to_value().map(Secret::new))- .transpose()- }-pub fn get_primary_details_as_value(&self,) -> CustomResult<serde_json::Value, errors::ParsingError> {diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rsindex 690d16596b..95b02f0cdb 100644--- a/crates/router/src/core/admin.rs+++ b/crates/router/src/core/admin.rs@@ -606,12 +606,6 @@ impl MerchantAccountCreateBridge for api::MerchantAccountCreate {let publishable_key = create_merchant_publishable_key();let db = &*state.store;- let metadata = self.get_metadata_as_secret().change_context(- errors::ApiErrorResponse::InvalidDataValue {- field_name: "metadata",- },- )?;-let merchant_details = self.get_merchant_details_as_secret().change_context(errors::ApiErrorResponse::InvalidDataValue {field_name: "merchant_details",@@ -659,7 +653,7 @@ impl MerchantAccountCreateBridge for api::MerchantAccountCreate {}).await?,publishable_key,- metadata,+ metadata: self.metadata,storage_scheme: MerchantStorageScheme::PostgresOnly,created_at: date_time::now(),modified_at: date_time::now(),