cac payemnt integration and cbe rate exchange webscrabing

This commit is contained in:
marshal
2026-06-15 14:54:20 +03:00
parent e3c66bfa5e
commit 0aed9824ae
20 changed files with 680 additions and 76 deletions

View File

@@ -15,7 +15,16 @@ export default registerAs("app", () => ({
maxWagonsPerTrain: numberFromEnv("TRAIN_SCHEDULING_MAX_WAGONS_PER_TRAIN", 53),
},
cbeExchange: {
apiUrl: process.env.CBE_EXCHANGE_API_URL ?? "",
/** ethio.forex CBET page — scraped for USD buying/selling rates. */
scrapeUrl:
process.env.CBE_EXCHANGE_SCRAPE_URL ??
process.env.CBE_EXCHANGE_API_URL ??
"https://ethio.forex/bank/CBET",
/** @deprecated use scrapeUrl — kept for backward-compatible config reads */
apiUrl:
process.env.CBE_EXCHANGE_SCRAPE_URL ??
process.env.CBE_EXCHANGE_API_URL ??
"https://ethio.forex/bank/CBET",
fallbackRate: numberFromEnv("CBE_EXCHANGE_FALLBACK_RATE", 130),
cacheTtlMs: numberFromEnv("CBE_EXCHANGE_CACHE_TTL_MS", 3_600_000),
},