laravel-wallet icon indicating copy to clipboard operation
laravel-wallet copied to clipboard

Add Features to Wallet Package

Open hamedkhorasani opened this issue 10 months ago • 0 comments

Feature Request

1. Add Final Balance Field to Transactions Table:

Purpose: To track the wallet balance immediately after each transaction.

Implementation:

  • Add a new column to the Transactions table named final_balance.

  • Ensure the field is automatically populated with the wallet balance after the transaction is applied.

  • Validate the calculation by referencing the wallets table's balance and the transaction amount.

2. Add Checksum Field for Transaction Validation:

Purpose: To enhance the integrity and validation of transaction data.

Implementation:

  • Introduce a checksum field in the Transactions table.

  • The checksum should be a unique identifier based on transaction details (e.g., using a hash of transaction ID, timestamp, and amount).

  • Validate the checksum during transaction processing to detect any data tampering.

3. Add Frozen Balance Field to Wallets Table:

Purpose: To track the portion of the wallet balance that is currently frozen and unavailable for transactions.

Implementation:

  • Add a new column to the Wallets table named frozen_balance.

  • Update business logic to ensure that transactions respect the frozen balance (e.g., only the available balance can be used for transactions).

  • Include functionality to freeze or unfreeze specific amounts as required by business needs.

hamedkhorasani avatar Jan 14 '25 10:01 hamedkhorasani