GithubHelp home page GithubHelp logo

Comments (10)

rez1dent3 avatar rez1dent3 commented on May 28, 2024

@Peektower hello. Let's continue here.

from laravel-wallet.

rez1dent3 avatar rez1dent3 commented on May 28, 2024
  1. I don't understand what tag is. Can you describe your architecture?
  2. The wallet must have the currency stamped on it.
    a) Multi-wallets:
    $usd = $user->createWallet([
    'name' => 'Dollar USA',
    'slug' => 'my-usd',
    'meta' => [
    'currency' => 'USD',
    ],
    ]);

b) default wallet (any wallet. also suitable for multi-wallets):

$wallet->meta['currency'] = 'USD';
$wallet->save();

from laravel-wallet.

rez1dent3 avatar rez1dent3 commented on May 28, 2024

@Peektower I deleted your message in the next issue. Let's discuss separately. You have different problems.

from laravel-wallet.

Peektower avatar Peektower commented on May 28, 2024

from laravel-wallet.

rez1dent3 avatar rez1dent3 commented on May 28, 2024

You need to add the currency type to the meta and everything will start working.

from laravel-wallet.

rez1dent3 avatar rez1dent3 commented on May 28, 2024

@Peektower Did you succeed? If not, then write. I'll make some detailed example.

from laravel-wallet.

Peektower avatar Peektower commented on May 28, 2024

from laravel-wallet.

rez1dent3 avatar rez1dent3 commented on May 28, 2024

@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

from laravel-wallet.

Peektower avatar Peektower commented on May 28, 2024

from laravel-wallet.

rez1dent3 avatar rez1dent3 commented on May 28, 2024

@Peektower Hello.
The transaction does not have a sender, the transfer does.

Example:

$transfer = $user1->transfer($user2, 500);
self::assertTrue($transfer->relationLoaded('withdraw'));
self::assertTrue($transfer->relationLoaded('deposit'));
self::assertTrue($transfer->relationLoaded('from'));
self::assertTrue($transfer->relationLoaded('to'));
self::assertTrue($user1->wallet->is($transfer->from));
self::assertTrue($user2->wallet->is($transfer->to));

And from the wallet you can get the owner of the wallet.

from laravel-wallet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.