PHP code example of quicksoftapp / tcb-bank-api

1. Go to this page and download the library: Download quicksoftapp/tcb-bank-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

quicksoftapp / tcb-bank-api example snippets


use Quicksoftapp\TCBBankAPI\Facades\TCBBankAPI;

// Create payment reference
$response = TCBBankAPI::createReference('1732XXXXXX', '999ABCXXXX', 'John Doe', '255713999999', 'Tuition Fee');

// Reconcile transactions
$response = TCBBankAPI::reconcile('2025-10-01', '2025-10-21');

// Cancel reference number
$response = TCBBankAPI::cancelReference('112XXXXXXX', '999ABCXXXX');

// Handle callback (example controller)
public function callback(Request $request) {
    $data = TCBBankAPI::handleCallback($request->all());
    // Update your order/payment record here
    return response()->json(['status' => 'received']);
}
bash
php artisan vendor:publish --provider="Quicksoftapp\\TCBBankAPI\\TCBBankAPIServiceProvider" --tag=config