mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 00:45:41 +00:00
fix(payments): reconcile with gateway before expiring unpaid holds
Replace the fixed 5-minute grace with a settlement check at expiry: expire() calls the payment API's reconcile endpoint — paid intents are kept and allocated via payment.succeeded, unverifiable results defer expiry to the next tick, only verifiably unpaid holds expire.
This commit is contained in:
@@ -9,14 +9,6 @@
|
||||
|
||||
export const BATCH_TIMEZONE = 'Africa/Addis_Ababa';
|
||||
|
||||
/**
|
||||
* Slack after a booking's paymentDeadline before the settle sweep expires it.
|
||||
* Covers gateway/webhook lag for a payment STARTED inside the window —
|
||||
* initiation itself is hard-blocked at the deadline (BillingService.payInvoice),
|
||||
* so this never extends the time a customer has to begin paying.
|
||||
*/
|
||||
export const PAYMENT_GRACE_MS = 5 * 60_000;
|
||||
|
||||
/** How long before the pay deadline the one reminder notification goes out. */
|
||||
export const PAYMENT_REMINDER_LEAD_MS = 10 * 60_000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user