Download the PHP package ronappleton/laravel-wallet without Composer

On this page you can find all versions of the php package ronappleton/laravel-wallet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-wallet

Laravel Wallet

Introduction

Laravel Wallet is a configurable wallet system for platform transaction management, it has nothing to do with payment providers or the crediting of funds.

If you provide a platform that uses micro transactions between users and other entities then this package can help facilitate that whilst recording those transactions.

Potential Uses:

The package is configurable to allow for adoption into existing platforms and for good control of an implementation within a new platform.

Feature List

Configurable Options

Installation

The package is automatically registered and discovered.

Usage

A trait is provided Appleton\LaravelWallet\Models\Concerns\HasWallets

Use the trait in any models like User that you want to have wallets.

You can then use User::createWallet(string|BackedEnum $currency) to create a new wallet for the user. If the user already has a wallet for the currency, and the setting one_wallet_per_currency is true, a WalletExists exception will be thrown.

You can use the currency column in a couple of ways:

This ensures you can use the system for multiple purposes within the same installation.

Wallets cannot be either updated, nor deleted. This ensures consistency in data recording i.e. transactions.

Transactions cannot be update, nor deleted. Again this is for consistency in data recording.

You can as you would imagine call balance on a wallet model, the balance will always be calculated from the transactions table.

This means you may find performance degradation over time and is why you can configure the wallet and wallet transaction models via config, so you can tune your approach.

Moving funds

There is 3 methods on the Wallet Model related to moving funds about:

You will notice the array $meta parameter to each method.

This is provided for you to add any extra information you may need to record.

It should be noted that the authenticated user will automatically be recorded.

You will also notice the CurrencyConverter parameter of the transfer method.

Understandably you may need to convert currencies/points etc.

CurrencyConverter is an interface within the package that allows you to pass a converter to the method to allow for conversion. The contract sets out the methods required for the package to manage the conversions automatically. The conversion metadata is also recorded automatically, recording the currencies converted between, the rate used and the converter used.

Events

There are two events within the package that you can listen for:

The first event is dispatched when a transaction is started.

This event could be used to run fraud checks etc prior to the transaction being completed.

The second event is dispatched when a transaction is completed.

This event could be used to email a user details of the transaction for example, or maybe you charge commission on transfers, or for currency conversion and so on, a listener could be used to then create those charges.

Both events are fired during every transaction, deposit, withdrawal and transfer.


All versions of laravel-wallet with dependencies

PHP Build Version
Package Version
Requires ronappleton/laravel-typed-config Version v1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ronappleton/laravel-wallet contains the following files

Loading the files please wait ....