You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/atomic-service.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
3
3
Working with atomic wallet operations.
4
4
5
-
> You need wallet version 9.2 or higher
6
-
7
5
Before you start working with atomicity, you need to study the "Race Condition" section and configure the lock.
8
6
9
7
Sometimes it is necessary to apply actions to the user and the wallet atomically. For example, you want to raise an ad in the search and withdraw money from your wallet.
@@ -39,4 +37,4 @@ app(AtomicServiceInterface::class)->blocks([$wallet1, $wallet2], function () use
39
37
40
38
In this case, we blocked both wallets and started the process of debiting funds. Debiting from both wallets will be considered a successful operation. If there are not enough funds on some wallet, the operation is canceled.
Copy file name to clipboardExpand all lines: docs/batch-transactions.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
### API. Batch Transactions
2
2
3
-
> Since version 9.5+
4
-
5
3
Sometimes situations arise when there is a need to make multiple changes to wallets.
6
4
For example, we need to change the balance of many wallets at once. For example, the system administrator accrues a bonus for participating in some promotion. Previously, the code would look like this:
7
5
```php
@@ -78,7 +76,6 @@ use Bavix\Wallet\Services\ConsistencyServiceInterface;
78
76
app(AtomicServiceInterface::class)->blocks($wallets, function () use ($wallets, $amount) {
Copy file name to clipboardExpand all lines: docs/batch-transfers.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
### API. Batch Transfers
2
2
3
-
> Since version 9.5+
4
-
5
3
If you need multiple transfers between wallets, you can use a high-performance handle. It is worth remembering that the pen does not check the balance of the wallet before transferring, you need to take care of this yourself.
6
4
7
5
Previously, you would have written the following code:
@@ -38,6 +36,7 @@ The main thing is to keep uniqueness.
38
36
```php
39
37
use Bavix\Wallet\External\Api\TransferQuery;
40
38
39
+
// int version
41
40
new TransferQuery($from, $wallet, $amount, new \Bavix\Wallet\External\Dto\Extra(
42
41
deposit: new \Bavix\Wallet\External\Dto\Option(
43
42
null,
@@ -48,9 +47,24 @@ new TransferQuery($from, $wallet, $amount, new \Bavix\Wallet\External\Dto\Extra(
Copy file name to clipboardExpand all lines: docs/command-create-wallet.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# Asynchronous wallet creation
2
2
3
-
> You need wallet version 9.2 or higher
4
-
5
3
The idea is based on the division into teams for creating wallets, transactions, etc. The creation of a wallet can be accelerated if the client "generates a wallet himself".
6
4
7
5
---
@@ -58,4 +56,5 @@ You receive requests to create a wallet on the backend, and you create them asyn
58
56
59
57
The user no longer needs to wait for the creation of a wallet, it is enough to know the uuid. You get the most stable application.
0 commit comments