postmix / laravel-bitaps
A Bitaps API wrapper for Laravel Framework.
Requires
- php: ^7.1
- ext-json: *
- guzzlehttp/guzzle: ^6.4
This package is auto-updated.
Last update: 2024-10-29 05:28:49 UTC
README
Install
Require this package with composer using the following command:
composer require postmix/laravel-bitaps
After updating composer, add the service provider to the providers
array in config/app.php
PostMix\LaravelBitaps\LaravelBitapsServiceProvider::class,
Laravel 5.5+ use Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
You can also publish the config file to change implementations (ie. interface to specific class).
php artisan vendor:publish --provider="PostMix\LaravelBitaps\LaravelBitapsServiceProvider"
The wrapper uses several tables to save data into DB. So, before usage, you need to migrate that tables with default command.
Usage
If you would like to use testnet, you can add BITAPS_DEBUG=true to your .env file.
You are able to make implementations using app()->make() method. You can check available methods of the implementation via interfaces. Available implementations:
// Default currency: btc. Supported: btc, tbtc, ltc, bch, eth. app()->make(PostMix\LaravelBitaps\Contracts\IPaymentForwarding::class, ['currency' => 'btc']); app()->make(PostMix\LaravelBitaps\Contracts\ICallbackLog::class); app()->make(PostMix\LaravelBitaps\Contracts\IDomainAuthorization::class); app()->make(PostMix\LaravelBitaps\Contracts\IWallet::class, ['currency' => 'btc']); // WIP app()->make(PostMix\LaravelBitaps\Contracts\IDomainStatistic::class);
License
The Laravel Bitaps is open-sourced software licensed under the MIT license