vnpost/bankhub

A Laravel package for BankHub API integration

1.0.2 2024-08-27 07:31 UTC

This package is auto-updated.

Last update: 2024-09-27 07:40:07 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

  1. grantToken
  2. grantExchange
  3. grantInvalidate
  4. grantRemove
  5. Identity
  6. Balance
  7. Transactions
  8. 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.