PHP code example of katorymnd / pesapal-php-sdk

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

    

katorymnd / pesapal-php-sdk example snippets


$environment = 'sandbox';    // Change to 'production' when going live
$sslVerify   = false;        // Set to true in production

$environment = 'production';
$sslVerify   = true;

$orderTrackingId = $_GET['OrderTrackingId'];
$status = $pesapal->getTransactionStatus($orderTrackingId);
echo 'Transaction Status: ' . $status['status'];
bash
composer 
bash
   git clone https://github.com/katorymnd/pesapal-php-sdk.git
   
bash
   cd pesapal-php-sdk
   composer install