yemeni-open-source/laravel-wallet
A Laravel package that adds wallet functionality to your application, offering a simple API for managing balances, deposits, withdrawals, and transactions so you can integrate digital wallets into PHP projects with minimal setup.
UnacceptedTransactionException) or returns a soft false is a product decision, not purely an implementation detail: it determines what the user sees at checkout, whether the flow retries, and whether the failure is surfaced in analytics. This release lets that decision be made per-surface (e.g. strict enforcement in withdrawals, soft-fail in low-stakes flows like promo credits or metered usage), rather than being locked to one global behavior.false behavior is exactly what lets one package serve both a hard-gated payout flow and a forgiving consumption flow.false instead of raising is a liability if it can be enabled accidentally or inherited by new call sites.try/catch.false is returned — otherwise you lose auditability and debugging signal.false is distinguishable from other falsy outcomes (e.g. zero-amount transactions) so callers don't misread success as failure.Executive summary: This release makes insufficient-balance handling a configurable product decision instead of a hard-coded error path. Teams can now choose, per flow, whether an empty wallet raises an exception or returns a simple false — so forgiving journeys (promo credits, metered usage, internal tooling) stop surfacing hard errors to users, while high-stakes flows (payouts, withdrawals) keep strict enforcement. It is a small, additive change with no new infrastructure and no migration.
For engineering: additive and backwards compatible — existing exception-based call sites are unaffected, and the false return is opt-in. Benefit is reduced try/catch boilerplate at call sites that only need a boolean gate. Two requirements before rollout: (1) guarantee the suppressed path still writes an audit record with a failure reason, and (2) standardize per-flow usage so we don't end up with two error conventions in the same domain.
Product recommendation: adopt as part of the wallet integration, but gate it behind an explicit, documented choice per flow — not a global setting. Revisit if a future release changes the default, since that would alter the failure contract for all existing consumers.
How can I help you explore Laravel packages today?