bmatovu / laravel-beyonic
Laravel wrapper for Beyonic API
v0.0.1
2023-03-26 19:02 UTC
Requires
- php: ^7.2.5|^8.0
- guzzlehttp/guzzle: ^6.3|^7.0
- illuminate/http: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/support: ^6.0|^7.0|^8.0|^9.0|^10.0
Requires (Dev)
- code-lts/doctum: ^5.5
- friendsofphp/php-cs-fixer: ^2.18|^3.0
- illuminate/container: ^6.0|^7.0|^8.0|^9.0|^10.0
- orchestra/testbench: ^4.0|^5.0|^6.0|7.0|^8.0
- phpunit/phpunit: ^8.0|^9.0|^10.0
README
Introduction
This package helps you integrate the Beyonic into your Laravel application.
Sign up and create your client application
Installation
To get started, install the package via the Composer package manager:
composer require bmatovu/laravel-beyonic
Configuration customization
If you wish to customize the default configurations, you may export the default configurations using
php artisan vendor:publish --provider="Bmatovu\Beyonic\BeyonicServiceProvider" --tag="config"
Update the following settings in your environment file.
.env
+ BEYONIC_API_URI=https://api.beyonic.com/api/ + BEYONIC_API_TOKEN=... + BEYONIC_API_VERSION=v3 + BEYONIC_CURRENCY=BXC + BEYONIC_SEND_INSTRUCTIONS=true
Usage
use Bmatovu\Beyonic\Services\Collection; $collection = new Collection(); // Request a user to pay you $apiTransactionResponse = $collection->ask('+80000000004', 500); $transaction = json_decode($apiTransactionResponse); // Get transaction details $apiTransactionResponse = $collection->get($transaction->id); // Get transactions $apiTransactionsResponse = $collection->all();
Reporting bugs
If you've stumbled across a bug, please help us by leaving as much information about the bug as possible, e.g.
- Steps to reproduce
- Expected result
- Actual result
This will help us to fix the bug as quickly as possible, and if you wish to fix it yourself feel free to fork the package and submit a pull request!