Issue: feat(core): setup platform merchant account

- Setup platform merchant account.
Platform merchant account is a special type of merchant account which can do operations on behalf of other merchant account present in the same organisation.
- Add APIs to create a platform merchant account / convert a merchant account into platform account.
- Feature should be disabled in sandbox and production.

Resolution: <think>
PR Context:
- Title: feat(core): implemented platform merchant account
- Merged: 2024-12-23T13:21:14Z
- Files changed: 30 files
- Commits: 30 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [X] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
#### About the feature
- This the first PR for the Platform Account feature.
- Feature is under development and behind the feature flag. 
- Feature is supposed to be disabled for sandbox and production environments.
#### Enabling the platform account.
- New API has been created t
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(core): implemented platform merchant account (#6882)
Co-authored-by: Narayanbhat166 <narayan.bh
Files to modify:


**crates/diesel_models/src/merchant_account.rs**
  Modify existing code

**crates/diesel_models/src/payment_intent.rs**
  Modify existing code

**crates/diesel_models/src/schema.rs**
  Modify existing code

**crates/diesel_models/src/schema_v2.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/errors/api_error_response.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/merchant_account.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/payments.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
  Modify existing code

**crates/router/build.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/errors.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/payment_intents.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/setup_intents.rs**
  Modify existing code

**crates/router/src/configs/secrets_transformers.rs**
  Modify existing code

**crates/router/src/configs/settings.rs**
  Add:
    - struct: pub::Platform

**crates/router/src/core/admin.rs**
  Add:
    - function: pub::enable_platform_account

**crates/router/src/core/fraud_check.rs**
  Modify existing code

**crates/router/src/core/fraud_check/operation.rs**
  Modify existing code

**crates/router/src/core/fraud_check/operation/fraud_check_post.rs**
  Modify existing code

**crates/router/src/core/payments.rs**
  Modify existing code

**crates/router/src/core/payments/helpers.rs**
  Modify existing code

**crates/router/src/core/payments/operations.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_approve.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_cancel.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_capture.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_capture_v2.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_complete_authorize.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_confirm.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_confirm_intent.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_create.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_create_intent.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_get.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_get_intent.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_post_session_tokens.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_reject.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_session.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_session_intent.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_start.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_status.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_update.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payment_update_intent.rs**
  Modify existing code

**crates/router/src/core/payments/operations/payments_incremental_authorization.rs**
  Modify existing code

**crates/router/src/core/payments/operations/tax_calculation.rs**
  Modify existing code

**crates/router/src/core/payments/session_operation.rs**
  Modify existing code

**crates/router/src/core/webhooks/incoming.rs**
  Modify existing code

**crates/router/src/lib.rs**
  Modify existing code

**crates/router/src/routes/admin.rs**
  Add:
    - function: pub::merchant_account_enable_platform_account

**crates/router/src/routes/app.rs**
  Modify existing code

**crates/router/src/routes/lock_utils.rs**
  Modify existing code

**crates/router/src/routes/payments.rs**
  Modify existing code

**crates/router/src/services/authentication.rs**
  Add:
    - function: pub::get_id_type_from_header_if_present
    - function: private::get_connected_merchant_account
    - function: private::get_platform_merchant_account
    - function: private::get_and_validate_connected_merchant_id
    - function: private::throw_error_if_platform_merchant_authentication_required

**crates/router/src/utils/user/sample_data.rs**
  Modify existing code

**crates/router/src/workflows/outgoing_webhook_retry.rs**
  Modify existing code

**crates/router/src/workflows/payment_sync.rs**
  Modify existing code

**crates/router/tests/payments.rs**
  Modify existing code

**crates/router/tests/payments2.rs**
  Modify existing code

**crates/router_env/src/logger/types.rs**
  Modify existing code