yemenopensource/laravel-wallet
A Laravel package for adding wallet functionality to your app, with balance management, credit and debit transactions, and a simple API for handling user funds.
false instead of throwing UnacceptedTransactionException. That is a product-facing decision, not just a code style one: it determines whether a failed withdrawal becomes a 402/422 error response, a soft "insufficient balance" UI state, or a queue/retry path. Pick the semantics per surface — checkout flows usually want the boolean for validation-style UX; ledger-to-ledger transfers usually want the exception so nothing silently no-ops.Adopt when:
Look elsewhere when:
Caveat on v1.2.0 specifically: the default behavior is unchanged (exception still thrown), so this is additive and non-breaking. But enabling the false mode silently changes the contract at every call site that previously relied on try/catch — treat flipping that flag as a reviewed, per-surface decision with tests, not a global config toggle.
To executives: This package gives us a battle-tested wallet primitive — balances, atomic debits, and concurrency safety — instead of us writing money-movement code ourselves. That is the highest-risk, lowest-differentiation code in any payments-adjacent product, and buying it moves our timeline from weeks to days while removing a class of race-condition bugs that are expensive to find in production. The latest release also lets us choose, per feature, whether "insufficient funds" is a hard error or an expected user state — which means better checkout UX without extra engineering.
To engineering: Adopt it as the balance store, not as the ledger of record. Map the transaction table into our own reconciliation job from day one, and be deliberate about exception vs. false per call site: exception for anything that must not silently no-op (transfers, payouts), boolean for validation-style guards (cart affordability, spend caps). Default behavior is unchanged in v1.2.0, so this is a safe upgrade — but any place we flip the flag needs a test asserting the new return contract.
How can I help you explore Laravel packages today?