# Umbrella root config — applies to all 3 apps: upi_core, upi_dynamic, upi_static import Config # ─── upi_core: Database & shared services ───────────────────────────────────── config :upi_core, ecto_repos: [UpiCore.Repo], generators: [timestamp_type: :utc_datetime] config :upi_core, UpiCore.Mailer, adapter: Swoosh.Adapters.Local # Oban background job processing (repo defined per-env in dev.exs / runtime.exs) config :upi_core, Oban, repo: UpiCore.Repo, notifier: Oban.Notifiers.PG, plugins: [Oban.Plugins.Pruner], queues: [default: 10, transactions: 20] # NPCI endpoint (shared by both apps) config :upi_core, :npci_resppay_endpoint, "https://precert.nfinite.in/iupi/RespPay/2.0/urn:txnid:" # International corridors config :upi_core, :international_corridors, singapore: %{ adapter: UpiCore.Adapters.SandboxPartner, base_currency: "SGD", default_fx_markup: "2.50", settlement_frequency: "T+1" }, uae: %{ adapter: UpiCore.Adapters.SandboxPartner, base_currency: "AED", default_fx_markup: "2.25", settlement_frequency: "T+0" }, usa: %{ adapter: UpiCore.Adapters.SandboxPartner, base_currency: "USD", default_fx_markup: "2.75", settlement_frequency: "T+1" } config :upi_core, :fx_providers, primary: %{provider: "RBI_REFERENCE_RATE", refresh_interval: 300}, fallback: %{provider: "SANDBOX_RATES", enabled: true} # ─── upi_dynamic: Dynamic QR PSP (orgId: MER101) ───────────────────────────── config :upi_dynamic, UpiDynamic.Endpoint, url: [host: "localhost"], adapter: Bandit.PhoenixAdapter, render_errors: [formats: [json: UpiDynamic.ErrorJSON], layout: false], pubsub_server: UpiCore.PubSub, live_view: [signing_salt: "dyn_T2khpiNc"] config :upi_dynamic, psp_org_id: "MER101", psp_net_inst_id: "MER1010001" # ─── upi_static: Static QR PSP (orgId: MER102) ─────────────────────────────── config :upi_static, UpiStatic.Endpoint, url: [host: "localhost"], adapter: Bandit.PhoenixAdapter, render_errors: [formats: [json: UpiStatic.ErrorJSON], layout: false], pubsub_server: UpiCore.PubSub, live_view: [signing_salt: "stt_T2khpiNc"] config :upi_static, psp_org_id: "MER102", psp_net_inst_id: "MER1020002" # ─── upi_web: Admin Dashboard ──────────────────────────────────────────────── config :upi_web, UpiWeb.Endpoint, url: [host: "localhost"], adapter: Bandit.PhoenixAdapter, render_errors: [formats: [html: UpiWeb.ErrorHTML, json: UpiWeb.ErrorJSON], layout: false], pubsub_server: UpiCore.PubSub, live_view: [signing_salt: "web_T2khpiNc"] # ─── Shared ─────────────────────────────────────────────────────────────────── config :logger, level: :info, backends: [ :console, {UpiCore.Logging.FileBackend, []} ] config :logger, :console, format: "$time $metadata[$level] $message\n", metadata: [:request_id] config :phoenix, :json_library, Jason import_config "#{config_env()}.exs"