Skip to content

Releases: bavix/laravel-wallet

2.1.0

22 Nov 13:01
6baa318
Compare
Choose a tag to compare

Added

  • File changelog.
  • Add HasGift trait.
  • Added status column to the transfers table.
  • Added status_last column to the transfers table.
  • Added methods: refundGift, safeRefundGift, forceRefundGift
  • A new argument is added to the "old refund" methods $gifts.

Fixed

  • Due to the addition of new functionality gifts
    there are possible problems that need to be addressed.
    Namely, when returning the goods,
    the funds would not be returned to
    the person who paid for it.
    Which would raise a lot of questions.

Changed

  • Composer.json: add new keywords.
  • the $gifts argument (Boolean type) is added to
    the paid, refund, safeRefund, forceRefund method's.

Removed

  • Removed column refund from transfers table.
    Now it has been replaced by the status column.

Full Changelog: 2.0.1...2.1.0

2.0.1

21 Nov 11:36
94bb97a
Compare
Choose a tag to compare

Added

  • add method getAvailableBalance.
    public getAvailableBalance(): int.

Full Changelog: 2.0.0...2.0.1

2.0.0

21 Nov 08:28
494f2fd
Compare
Choose a tag to compare

Added

  • table wallets.
  • add wallet_id to table transactions and foreign key's.
  • add fee to table transfers.
  • add localization's.
  • add Taxing interface.
  • add WalletFloat interface.
  • add const TYPE_DEPOSIT, TYPE_WITHDRAW.
  • add Wallet model.
  • add working with fractional (float) numbers.
  • add method calculateBalance.
  • add method payFree.
    public payFree(Product $product): Transfer.
  • add CanBePaidFloat trait.
  • Added the ability to collect Commission
    when withdrawing funds in transfers.
  • Added the ability to work with multiple wallets.
  • Added a class that stores user balance. To avoid any problems.
  • add HasWalletFloat trait.
  • add HasWallets trait.

Changed

  • Add $type argument before $amount.
    protected change(string $type, int $amount, ?array $meta, bool $confirmed): Transaction.

Fixed

  • Due to the addition of the ability to buy for free,
    there was a bug in which we returned the full cost.
  • Due to the addition of the ability to work with
    many wallets, there were bugs with payments.
    When the user bought the goods and the goods were
    assigned to the wallet, not to the user.
    This change of method: change, transactions,
    transfers, wallet, etc.

What's Changed

Full Changelog: 1.2.3...2.0.0

1.2.3

11 Nov 06:13
6013015
Compare
Choose a tag to compare

Changed

  • readme: Added new features.
  • Composer.json: add new keywords.

Full Changelog: 1.2.2...1.2.3

1.2.2

10 Nov 18:53
9edf842
Compare
Choose a tag to compare

Added

  • method public forcePay(Product $product): Transfer.
  • method public forceRefund(Product $product): bool.

Changed

  • the $force parameter was added to the pay method.
    public pay(Product $product, bool $force = false): Transfer.
  • the $force parameter was added to the safePay method.
    public safePay(Product $product, bool $force = false): ?Transfer.
  • the $force parameter was added to the canBuy method.
    public canBuy(Customer $customer, bool $force = false): bool.
  • the $force parameter was added to the refund method.
    public refund(Product $product, bool $force = false): bool.
  • the $force parameter was added to the safeRefund method.
    public safeRefund(Product $product, bool $force = false): bool.

Fixed

  • Fixed magic method.
    He accounted for unconfirmed transactions.

What's Changed

Full Changelog: 1.2.1...1.2.2

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