Installation - Aslam97/laravel-bank-bca GitHub Wiki

Laravel Bank BCA requires PHP 7.2-8.0. This particular version supports Laravel 6-8.

Version Laravel Version Minimum PHP Version
1.x.x 6.x - 8.x 7.2-8.0

Require this package with composer.

composer require aslam/laravel-bank-bca

Configuration file you can publish it with the following Artisan command

php artisan vendor:publish --provider="Aslam\Bca\Providers\BriServiceProvider"

Response

The API method returns an instance of \Aslam\Bca\Response, which provides a variety of methods that may be used to inspect the response:

method()->body() : string;
method()->toJson() : array|mixed;
method()->collect() :  // Illuminate\Support\Collection;
method()->status() : int;
method()->ok() : bool;
method()->successful() : bool;
method()->failed() : bool;
method()->serverError() : bool;
method()->clientError() : bool;
method()->header($header) : string;
method()->headers() : array;

Facades

use BcaAPI

This package also exposes a helper function you can use if you are not a fan of Facades using

bcaapi()