Closed rez1dent3 closed 10 months ago
@Peektower hello. Let's continue here.
b) default wallet (any wallet. also suitable for multi-wallets):
$wallet->meta['currency'] = 'USD';
$wallet->save();
@Peektower I deleted your message in the next issue. Let's discuss separately. You have different problems.
I’m using the tag to identify the user’s wallet
I’m using this trait HasWallets
So I want to exchange the amount based on the currency using the wallet exchange method. But when I do, the exact amount is transferred without the conversion
On Fri, 26 Jan 2024 at 16:35, Maxim Babichev @.***> wrote:
- I don't understand what tag is. Can you describe your architecture?
The wallet must have the currency stamped on it. a) Multi-wallets:
b) default wallet:
$wallet->meta['currency'] = 'USD';$wallet->save();
— Reply to this email directly, view it on GitHub https://github.com/bavix/laravel-wallet/issues/872#issuecomment-1912350947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMJBIPOIBHOLVWS5F3BOXKDYQPLNZAVCNFSM6AAAAABCMM3GKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGM2TAOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>
You need to add the currency type to the meta and everything will start working.
@Peektower Did you succeed? If not, then write. I'll make some detailed example.
Using the exchange does work for me, so I’m opting to use external currency conversion api
On Fri, 26 Jan 2024 at 17:15, Maxim Babichev @.***> wrote:
@Peektower https://github.com/Peektower Did you succeed? If not, then write. I'll make some detailed example.
— Reply to this email directly, view it on GitHub https://github.com/bavix/laravel-wallet/issues/872#issuecomment-1912405213, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMJBIPISWZ4UMEEKTHM446TYQPQEVAVCNFSM6AAAAABCMM3GKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGQYDKMRRGM . You are receiving this because you were mentioned.Message ID: @.***>
@Peektower The laravel-wallet-swap package works on top of the https://github.com/florianv/laravel-swap package, so all package providers (api providers and more) are available to you.
https://github.com/florianv/laravel-swap?tab=readme-ov-file#services
Hi again Maxim, this is my response when i fetch the transactions
{ "id": 2, "user": 1, "type": "withdraw", "amount": "-22", "meta": "For lunch" },
so the challenges here now is how can i know the sender or receiver of the transactions
On Fri, 26 Jan 2024 at 17:38, Maxim Babichev @.***> wrote:
@Peektower https://github.com/Peektower The laravel-wallet-swap package works on top of the https://github.com/florianv/laravel-swap package, so all package providers (api providers and more) are available to you.
https://github.com/florianv/laravel-swap?tab=readme-ov-file#services
— Reply to this email directly, view it on GitHub https://github.com/bavix/laravel-wallet/issues/872#issuecomment-1912433365, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMJBIPP2GKBUFKWIOZISTFLYQPSYLAVCNFSM6AAAAABCMM3GKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGQZTGMZWGU . You are receiving this because you were mentioned.Message ID: @.***>
@Peektower Hello. The transaction does not have a sender, the transfer does.
And from the wallet you can get the owner of the wallet.
@rez1dent3 Im trying to do wallet exchange have followed this steps from this link Laravel Wallet Swap but it dosen't exchange the amount instead it just transfer the amount I entered. can you please help
Here is my code
"bavix/laravel-wallet-swap": "^6.0",
Originally posted by @Peektower in https://github.com/bavix/laravel-wallet/issues/863#issuecomment-1912154724