Skip to content

Releases: bavix/laravel-wallet

1.2.1

09 Nov 10:22
2a11a16
Compare
Choose a tag to compare

Added

  • check for php 7.3

What's Changed

Full Changelog: 1.2.0...1.2.1

1.2.0

09 Nov 08:25
d275c60
Compare
Choose a tag to compare

Added

  • phpunit to the project.

What's Changed

Full Changelog: 1.1.2...1.2.0

1.1.2

08 Nov 14:37
ce5a1cf
Compare
Choose a tag to compare

Fixed

  • Fixed "balance" method.
    He counted the amount along with the unconfirmed transactions.

Full Changelog: 1.1.1...1.1.2

1.1.1

08 Nov 13:27
Compare
Choose a tag to compare

Changed

  • Update readme.
  • New indexes have names for quick removal.

Fixed

  • Fixed down migration method transfers.

What's Changed

Full Changelog: 1.1.0...1.1.1

1.1.0

08 Nov 10:25
2a7196c
Compare
Choose a tag to compare

Added

  • Added index for fields in "transfers" table: ['from_type', 'from_id', 'refund'].
  • Added index for fields in "transfers" table: ['to_type', 'to_id', 'refund'].
  • In the table "transactions" added to the type index.
  • Exception ProductEnded
  • Method public paid(Product $product): ?Transfer.
  • Method public canBuy(Customer $customer): bool.
  • Static balance caching. Also the description for what it is necessary.

Changed

  • In the table "transactions" is deleted the index of the field "uuid" and added a unique index.
  • In the table "transfers" is deleted the index of the field "uuid" and added a unique index.
  • Method pay began to check the possibility of buying.

Removed

  • public resetBalance(): void

What's Changed

Full Changelog: 1.0.0...1.1.0

1.0.0

07 Nov 15:03
d38f7ef
Compare
Choose a tag to compare

Added

  • Added refund field to transfers table.

Changed

  • Updated the refund method.
    The operation is now executed in the transaction and updates the new refund field.

Deprecated

  • public resetBalance(): void

What's Changed

Full Changelog: 0.0.1...1.0.0

0.0.1

07 Nov 14:24
e0882e2
Compare
Choose a tag to compare

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 and Wallet 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
  • CanBePaid trait and Product, Costomer interface's
    • methods:
      • public pay(Product $product): Transfer
      • public safePay(Product $product): ?Transfer
      • public refund(Product $product): bool
      • public safeRefund(Product $product): bool
  • Exceptions: AmountInvalid, BalanceIsEmpty.
  • Models: Transfer, Transaction.

What's Changed

Full Changelog: https://github.com/bavix/laravel-wallet/commits/0.0.1