Releases: bavix/laravel-wallet
Releases · bavix/laravel-wallet
1.0.0
Added
- Added
refund
field totransfers
table.
Changed
- Updated the
refund
method.
The operation is now executed in the transaction and updates the newrefund
field.
Deprecated
- public resetBalance(): void
What's Changed
- Scrutinizer Auto-Fixes by @scrutinizer-auto-fixer in #2
Full Changelog: 0.0.1...1.0.0
0.0.1
Added
- written README.
- Project configuration file created.
- Migration 2018_11_06_222923_create_transactions_table.
- Migration 2018_11_07_192923_create_transfers_table.
HasWallet
trait andWallet
interface.- methods:
- private checkAmount(int $amount): void
- public forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
- public deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
- public withdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
- public canWithdraw(int $amount): bool
- public transfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
- public safeTransfer(Wallet $wallet, int $amount, ?array $meta = null): ?Transfer
- public forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
- protected assemble(Wallet $wallet, Transaction $withdraw, Transaction $deposit): Transfer
- protected change(int $amount, ?array $meta, bool $confirmed): Transaction
- public resetBalance(): void
- relations:
- public transactions(): MorphMany
- public transfers(): MorphMany
- magic property
- public getBalanceAttribute(): int
- methods:
CanBePaid
trait andProduct
,Costomer
interface's- methods:
- public pay(Product $product): Transfer
- public safePay(Product $product): ?Transfer
- public refund(Product $product): bool
- public safeRefund(Product $product): bool
- methods:
- Exceptions: AmountInvalid, BalanceIsEmpty.
- Models: Transfer, Transaction.
What's Changed
- Scrutinizer Auto-Fixes by @scrutinizer-auto-fixer in #1
Full Changelog: https://github.com/bavix/laravel-wallet/commits/0.0.1