- Shipped
- 28 พฤษภาคม 2569 เวลา 22:46 UTC
- Author
- Kamo
- Commit
- 482b481
Compliance: - MlaCheckService — Military Lending Act covered-borrower lookup against DoD MDC single-record query. Returns NotCovered if unconfigured so dev doesn't hard-fail; production MUST configure los.mla.endpoint + api-key OR run manual MLA at the org's KYC step (PII access required). - OfacSanctionsService — Treasury SDN list cached in-memory, refreshed nightly from sdn.csv. Unicode NFD normalization + diacritic stripping. Wired into LoanOfferService.send: SDN hit blocks the send and writes a STATE_RULE_VIOLATION_DETECTED audit row. - LoanLifecycleService cooling-off now reads LoanStateRule.coolingOffDays for the borrower's state (replaces the LocalDateTime.now() placeholder). - Stripe account.updated webhook now syncs charges/payouts/details flags + default_currency + requirements_disabled_reason onto LoanOrgStripeConnect so cron jobs + the org settings UI see live capability state. Disclosure packet: - New DisclosurePacketBuilder bundles TILA box + GLBA privacy notice + ECOA non-discrimination notice + ACH mandate authorization into one PDF via PDFBox PDFMergerUtility + stores in MediaService. Each component is recorded as a LoanDisclosure row keyed to the offer. LoanOfferService.send builds the packet automatically before the ESign envelope is created. Servicing operations: - **************** — fees/principal credit-or-debit with required reason; emits LoanPayment(INTERNAL_ADJUSTMENT or REVERSAL_ADJUSTMENT) + MANUAL_ADJUSTMENT audit - LoanAdjustmentService.waiveFee — flips LoanFee.waivedAt + credits feesPaidToDate + emits FEE_WAIVED audit - **************** — non-financial commitment row used in D60+ workflow tracking, emits PROMISE_TO_PAY_LOGGED audit - LoanAdjustmentController exposes /api/los/adjustments/{manual, fees/{uid}/waive, promise-to-pay} Observability: - **************** — importable dashboard with status gauges, payment outcome rates, R-code returns by code, webhook p50/p90/p99, disbursements/hour, charge-offs/day, JVM heap, HTTP rate Tests (30 total, all green): - 7 AmortizationEngine - 9 InterestAccrualEngine (including the previously-fixed 100x bug) - 5 PaymentAllocator - 4 NachaReturnCode (retry classes + mandate-revoking codes + describe) - 5 OfacSanctionsService (clean match / hit / diacritics / alias / disabled via reflection-injected cache, no network or test container needed)