diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs index dabe22da626e..c7009bf4cc98 100644 --- a/crates/router/src/core/admin.rs +++ b/crates/router/src/core/admin.rs @@ -219,6 +219,17 @@ pub async fn create_merchant_account( .insert_merchant(merchant_account, &key_store) .await .to_duplicate_response(errors::ApiErrorResponse::DuplicateMerchantAccount)?; + + db.insert_config(diesel_models::configs::ConfigNew { + key: format!("{}_requires_cvv", merchant_account.merchant_id), + config: "true".to_string(), + }) + .await + .map_err(|err| { + crate::logger::error!("Error while setting requires_cvv config: {err:?}"); + }) + .ok(); + Ok(service_api::ApplicationResponse::Json( merchant_account .try_into() diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs index c22b7323095b..20a3e130eb25 100644 --- a/crates/router/src/core/payment_methods/cards.rs +++ b/crates/router/src/core/payment_methods/cards.rs @@ -1831,7 +1831,7 @@ pub async fn list_customer_payment_method( ) .await .change_context(errors::ApiErrorResponse::InternalServerError) - .attach_printable("Failed to fetch merchant_id config for requires_cvv")?; + .attach_printable("Failed to fetch requires_cvv config")?; let requires_cvv = is_requires_cvv.config != "false";