The Wallet & Payment module is the money path — requires extra caution. Key points (see Indonesian version for details):
- DOKU is the primary gateway (checkout + withdraw); Duitku for subscription; Aspire is sandbox experiment; Midtrans has no registered webhook
- DOKU sub-account per store = multi-tenant balance separation
OrderObserverdeposits to wallet only whenpayment_method === 'instant_payment'- Withdraw is request-only —
WalletController::withdraw()createsPENDINGtransaction; actual processing (DOKU payout, bank transfer) happens in the separateadmin-dazoapplication WalletService::requestWithdrawal()has full logic (DOKU payout, rollback, PIN lock) but is not route-connected — unused- PIN lock bypass in
WalletController::withdraw()— usesHash::checkdirectly, notWalletService::verifyPin() - Inconsistent type/status values between service constants and controller literals
available_balanceaccessor makes live HTTP call to DOKU on every read- 7 webhook endpoints in
routes/api.php