bavix / laravel-wallet

It's easy to work with a virtual wallet
https://bavix.github.io/laravel-wallet/
MIT License
1.14k stars 229 forks source link

Support IDR Currency?🤔 #713

Closed dzaki236 closed 1 year ago

dzaki236 commented 1 year ago

It is has a idr currency support?, or just dollar(US)?, i want use this, but in my case,i want to use IDR(rupiah currency), it is has been there before yet?

I'd like to this library, it can be used for IDR(Rupiah) currency, or someelse..

Maybe, it has been available before, but i don't know and see?

for additional, thanks for your work, i like it, maybe i'll use this on my case 💖

rez1dent3 commented 1 year ago

Hello. The library is not tied to a specific currency. You implement all the business logic yourself. You can sell both real currency and virtual.

Here is a simple example:

$idr = $user->createWallet([
    'name' => 'rupiah currency',
    'meta' => ['currency' => 'IDR'],
]);

$idr->currency; // IDR
$idr->deposit(100); // Top up with one rupee
$idr->balanceFloatNum; // 1.00
$idr->balanceInt; // 100

If you need a currency exchange, then you can look towards https://github.com/bavix/laravel-wallet-swap

Docs: https://bavix.github.io/laravel-wallet/#/laravel-wallet-swap

swap is a wrapper around the florianv/laravel-swap library. And there are a lot of providers in this library, there are even crypto exchanges.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 7 days with no activity.

dzaki236 commented 1 year ago

Alright i understands, thanks, great work!🔥

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 7 days with no activity.