PHP code example of kongofiscal / kongoconnect-php

1. Go to this page and download the library: Download kongofiscal/kongoconnect-php 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/ */

    

kongofiscal / kongoconnect-php example snippets



KongoConnect\Sdk\Facades\KongoConnect;
use KongoConnect\Sdk\Models\FiscalTransactionRequest;

// Initialisation (pas besoin de paramètres si vos variables d'environnement sont définies)
KongoConnect::init();

$request = new FiscalTransactionRequest(
    transactionId: "TX-" . time(),
    payload: ["amount" => 1500, "currency" => "CDF"]
);

$response = KongoConnect::sendTransaction($request);
print_r($response);
bash
composer 
bash
php artisan vendor:publish --tag=kongoconnect-config