vnpost / bankhub
A Laravel package for BankHub API integration
1.0.3
2024-11-22 08:17 UTC
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^11.1
This package is auto-updated.
Last update: 2025-04-22 09:13:27 UTC
README
A PHP package for BankHub API integration.
Author
Kiên Nguyễn
Installation
To install the package, run the following command:
composer require vnpost/bankhub
Configuration
Step 1: Publish Configuration
Publish the configuration file using the following command:
php artisan vendor:publish --provider="BankHub\BankHubServiceProvider"
Step 2: Update .env File
Add the following variables to your .env file:
BANKHUB_MODE=sandbox BANKHUB_CLIENT_ID=your-client-id BANKHUB_SECRET_KEY=your-secret-key
Step 3: How to use?
Option 1:
use BankHub\BankHubClient; $response = BankHubClient::AuthCode('your-authorization-code')->grantToken($data);
Option 2:
use BankHub\BankHubClient; $client = new BankHubClient(); $client->AuthCode('your-authorization-code'); $response = $client->grantToken($data);
Option 3:
use BankHub\BankHubClient; $client = new BankHubClient('your-authorization-code'); $response = $client->grantToken($data);
List of available functions
- grantToken
- grantExchange
- grantInvalidate
- grantRemove
- Identity
- Balance
- Transactions
- QrPay
Chi tiết xem tại https://bankhub.dev/general/api
License
This package is open-sourced software licensed under the Apache-2.0 license.