Download the PHP package kevupton/laravel-coinpayments without Composer
On this page you can find all versions of the php package kevupton/laravel-coinpayments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kevupton/laravel-coinpayments
More information about kevupton/laravel-coinpayments
Files in kevupton/laravel-coinpayments
Informations about the package laravel-coinpayments
Laravel Coinpayments
Implementation of most of the CoinPayments functionality.
Example API
Require
1. Install Service Provider
OR
All service providers are registered in the config/app.php
configuration file.
2. Configure
.env
configuration
Execute php artisan vendor:publish
for the complete config file.
Config: coinpayments.php
3. Setup Database
Run the migration to install the database tables
4. Usage
Simple Transaction
Callback Address
Withdrawal
Mass Withdrawal - Uses the same values for withdrawal, but in an array
Convert Coins
Withdrawal Info
Conversion Info
IPN validation
Laravel Coinpayments can automatically handle IPN's for you: Just specify, the path and enable it using the env variables.
You can just subscribe to the Model events using an event listening on the following events:
Deposit - When someone deposits money to a callback address
- DepositCreated - When a deposit has been created
- DepositUpdated - When a deposit has been updated, but not complete.
- DepositComplete - When a deposit has completed (after all of the confirms have been received)
Withdrawal - When you make a withdrawal from the API
- WithdrawalCreated
- WithdrawalUpdated
- WithdrawalComplete
Transaction - When you make a transaction from the API
- TransactionCreated
- TransactionUpdated
- TransactionComplete
Then just subscribe to the event by adding a listener to the App\Providers\EventServiceProvider
:
Then you can just do the same for each event.
Example event listener:
Manual Approach to IPNS:
4.1 Example Controller
CoinPayments Controller
5. Logging
Adjust the logging in the config file by selecting either LEVEL_NONE
, LEVEL_ERROR
or LEVEL_ALL
.
Logs will be saved into the database under $prefix . 'log'
.
Contributing
Feel free to make a pull request at any time. Any help is appreciated (Y)
All versions of laravel-coinpayments with dependencies
kevupton/laravel-package-service-provider Version ^0.0.5
doctrine/dbal Version ^2.6