mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Merge pull request #204 from Tria-plc/feat/payment-microservice
refactor: ( waafi ) use USD for demo
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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 ?? "",
|
||||
|
||||
@@ -42,7 +42,7 @@ export class ReconciliationService implements OnModuleInit, OnModuleDestroy {
|
||||
private readonly cacBankProvider: CacBankProvider,
|
||||
) {
|
||||
this.intervalMs =
|
||||
config.get<number>("app.reconciliation.sweepIntervalMs") ?? 60_000;
|
||||
config.get<number>("app.reconciliation.sweepIntervalMs") ?? 30_000;
|
||||
this.staleAfterMs =
|
||||
config.get<number>("app.reconciliation.staleAfterMs") ?? 60_000;
|
||||
this.batchSize = config.get<number>("app.reconciliation.batchSize") ?? 20;
|
||||
|
||||
Reference in New Issue
Block a user