evans-wanguba / kcb-bank-buni-api
This is a PHP package for handling KCB Bank Buni web service integration
Requires
- php: >=8.0
- guzzlehttp/guzzle: ~6.0|~7.0
Requires (Dev)
- mockery/mockery: ~1.3.1
- phpunit/phpunit: ~9.3
README
This is a PHP package for KCB Bank Buni web service integration. Buni is designed for the modern innovator. Developers can now leverage on the KCB API to offer their customers a seamless digital experience on their platforms. Buni helps you integrate a unified payment system onto your website or app, allowing customers to easily pay for your product or service. For more information, check out KCB Buni API Guide.
Installation
Pull in the package through Composer.
composer require evans-wanguba/kcb-bank-buni-api
Create the following variables in your .env file.
BUNI_ACCESS_TOKEN=AccessToken BUNI_ENV=sandbox
Supported API Services
- BancAssuranceFileService
- FundsTransferAPIService
- MpesaExpressAPIService
- MpesaTransactionInfo
- QueryCoreTransactionStatus
- ValidateExternalBill
- VendingGatewayApis
Usage
To make a fund transfer request is simple. Just initiate the BuniApi
and post the transaction:
use EvansWanguba\KcbBank\BuniApi; require "vendor/autoload.php"; // FundsTransferAPIService $buni = new BuniApi(); $fundsTransferParams = [ "beneficiaryDetails" => "JOHN DOE", "companyCode" => "KE0010001", "creditAccountNumber" => "1279287799", "currency" => "KES", "debitAccountNumber" => "1279258233", "debitAmount" => 26.0, "paymentDetails" => "UT Fund withdrawal", "transactionReference" => "FT1234567890", "transactionType" => "IF", "beneficiaryBankCode" => "01" ]; $buni->postFundsTransferAPIService($fundsTransferParams);
Support
See sample.php
for more examples.
Or email me at ewanguba@gmail.com