PHP code example of caydeesoft / payments

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

    

caydeesoft / payments example snippets


use Payments;

Payments::stkpush($request);
Payments::channel('airtel')->stkpush($request);
Payments::channel('mpesa', 'production')->balance($request);

Payments::channel('mpesa')->api($request, '/your/provider/endpoint', 'post', [
    'amount' => 1000,
]);

Payments::channel('mpesa')->billManagerSingleInvoice($request);
Payments::channel('mpesa')->billManagerBulkInvoice($request);
Payments::channel('mpesa')->ratibaCreate($request);
Payments::channel('mpesa')->taxRemittance($request);
Payments::channel('mpesa')->c2bSimulate($request);

Payments::channel('mtn')->requestToPay($request);
Payments::channel('mtn')->transfer($request);
Payments::channel('mtn')->requestToPayStatus($request);

Payments::channel('tigo')->stkpush($request);
Payments::channel('tigo')->transactionStatus($request);
Payments::channel('tigo')->b2c($request);