diff --git a/apps/edr-payment-api/src/config/app.config.ts b/apps/edr-payment-api/src/config/app.config.ts index c1128a872..041c47ac6 100644 --- a/apps/edr-payment-api/src/config/app.config.ts +++ b/apps/edr-payment-api/src/config/app.config.ts @@ -10,10 +10,10 @@ export default registerAs("app", () => ({ serviceAuthToken: process.env.SERVICE_AUTH_TOKEN ?? "", reconciliation: { /** How often the stale-intent sweep runs. */ - sweepIntervalMs: parseInt( - process.env.RECONCILE_SWEEP_INTERVAL_MS ?? "60000", - 10, - ), + // TODO(demo): revert to the env-driven line below after the demo. Temporarily FORCED to 30s + // here so the .env (RECONCILE_SWEEP_INTERVAL_MS) cannot override it. + // sweepIntervalMs: parseInt(process.env.RECONCILE_SWEEP_INTERVAL_MS ?? "60000", 10), + sweepIntervalMs: 30_000, /** An intent is "stale" when non-terminal and untouched for this long. */ staleAfterMs: parseInt(process.env.RECONCILE_STALE_AFTER_MS ?? "60000", 10), batchSize: parseInt(process.env.RECONCILE_BATCH_SIZE ?? "20", 10), diff --git a/apps/edr-payment-api/src/config/waafi.config.ts b/apps/edr-payment-api/src/config/waafi.config.ts index 05624922f..cfe2102f7 100644 --- a/apps/edr-payment-api/src/config/waafi.config.ts +++ b/apps/edr-payment-api/src/config/waafi.config.ts @@ -13,7 +13,10 @@ export default registerAs("waafi", () => ({ // Wallet payment method (EVC/ZAAD/Sahal) — MWALLET_ACCOUNT requires the payer phone up front. paymentMethod: process.env.WAAFI_PAYMENT_METHOD ?? "MWALLET_ACCOUNT", // Waafi has no ETB; when set this overrides the asserted currency (USD/DJF/SLSH). - currency: process.env.WAAFI_CURRENCY ?? "DJF", + // TODO(demo): revert to the env-driven line below after the demo. Temporarily FORCED to USD + // here so the .env (WAAFI_CURRENCY) cannot override it. + // currency: process.env.WAAFI_CURRENCY ?? "DJF", + currency: "USD", // Browser redirect targets after the hosted page completes/fails (UX only; webhook is source of truth). successUrl: process.env.WAAFI_HPP_SUCCESS_URL ?? "", failureUrl: process.env.WAAFI_HPP_FAILURE_URL ?? "", diff --git a/apps/edr-payment-api/src/modules/reconciliation/reconciliation.service.ts b/apps/edr-payment-api/src/modules/reconciliation/reconciliation.service.ts index 5216798f2..4c1dd9435 100644 --- a/apps/edr-payment-api/src/modules/reconciliation/reconciliation.service.ts +++ b/apps/edr-payment-api/src/modules/reconciliation/reconciliation.service.ts @@ -40,7 +40,7 @@ export class ReconciliationService implements OnModuleInit, OnModuleDestroy { private readonly providers: PaymentProviderMap, ) { this.intervalMs = - config.get("app.reconciliation.sweepIntervalMs") ?? 60_000; + config.get("app.reconciliation.sweepIntervalMs") ?? 30_000; this.staleAfterMs = config.get("app.reconciliation.staleAfterMs") ?? 60_000; this.batchSize = config.get("app.reconciliation.batchSize") ?? 20;