samirdjelal / cryptocurrency
Cryptocurrency Toolkit for Blockchain ₿
dev-master
2020-06-24 23:57 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.5
- illuminate/support: ~5|~6|~7
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2025-04-25 10:48:47 UTC
README
Note: this package is not ready for production.
Cryptocurrency toolkit let you integrate cryptocurrencies payment system into your existing laravel application.
Currently it support bitcoin.
Installation
You can install the package via composer:
composer require samirdjelal/cryptocurrency
Add the following fields to your .env
file.
BLOCKCHAIN_API_KEY=
BLOCKCHAIN_XPUB=
CALLBACK_SECRET_KEY=
Usage
// Get the current price of 1 BTC in USD. Cryptocurrency::bitcoin()->price(); // Generate a unique bitcoin address for a specific order id. Cryptocurrency::bitcoin()->orderId('abcd11')->address(); // The gap between the last used address and the last generated address. Cryptocurrency::bitcoin()->gap(); // Get information about a callback that already exists for a specific orderId. Cryptocurrency::bitcoin()->orderId('abcd11')->callback(); // Check if a payment is made. Cryptocurrency::bitcoin()->orderId('abcd11')->check();
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email samir.djelal.webdesign@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.