/ tag
Ruby
2 posts on this topic.
-
Charging a card once in Rails: the guard I shipped, and the gaps I didn't close
A payments flow is 'at least once' at every layer — retries, double-clicks, replayed webhooks. Here's the guard that stops the common cases, an honest accounting of the ones it doesn't, and how I'd close them.
-
Building an invoice tax engine in Rails that accountants trust
Tax-inclusive and tax-exclusive pricing round differently, and one cent of drift makes an invoice look broken. How I built a tax engine with the Strategy pattern, BigDecimal, and spreadsheet-verified golden-master tests.