samirdjelal/cryptocurrency

Cryptocurrency Toolkit for Blockchain ₿

dev-master 2020-06-24 23:57 UTC

This package is auto-updated.

Last update: 2024-09-25 09:26:46 UTC


README

Note: this package is not ready for production.

Latest Version on Packagist Build Status Quality Score Total Downloads

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.