feat(merchant_context): add struct merchant_context and replace all instances of merchant_account and key_store in core (#7882)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Uzair Khan
2025-04-29 14:41:21 +05:30
committed by GitHub
parent 3d0dd5bd1a
commit 693f9019cc
139 changed files with 4717 additions and 4298 deletions

View File

@ -65,7 +65,7 @@ pub async fn construct_webhook_router_data(
state: &SessionState,
connector_name: &str,
merchant_connector_account: domain::MerchantConnectorAccount,
merchant_account: &domain::MerchantAccount,
merchant_context: &domain::MerchantContext,
connector_wh_secrets: &api_models::webhooks::ConnectorWebhookSecrets,
request_details: &api::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<types::VerifyWebhookSourceRouterData, errors::ApiErrorResponse> {
@ -77,7 +77,7 @@ pub async fn construct_webhook_router_data(
let router_data = types::RouterData {
flow: PhantomData,
merchant_id: merchant_account.get_id().clone(),
merchant_id: merchant_context.get_merchant_account().get_id().clone(),
connector: connector_name.to_string(),
customer_id: None,
tenant_id: state.tenant.tenant_id.clone(),