1. Go to this page and download the library: Download rrcatto/ikhokha-php-sdk 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/ */
$f3->route('POST /api/ikhokha/webhook', function($f3) {
$rawBody = $f3->get('BODY');
$headers = getallheaders();
// Here you could verify ik-sign if you want, reusing the same signing logic.
$payload = json_decode($rawBody, true) ?: [];
// TODO: store $payload['status'], $payload['paylinkID'], $payload['externalTransactionID'], etc.
http_response_code(200);
echo 'OK';
});
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.