PHP code example of epmnzava / pesapal

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

    

epmnzava / pesapal example snippets


php artisan vendor:publish --provider="Epmnzava\Pesapal\PesapalServiceProvider"
 php


namespace App\Http\Controllers;

use Pesapal;

use Illuminate\Http\Request;
class TransactionController extends Controller
{
//

    public function customer_transaction(){

        
        //Pesapal::make_payment("customerfirstname","customerlastname","customerlastname","amount","transaction_id");
      $res=Pesapal::makepayment("emmnauel","30000","mnzava","[email protected]","MERCHANT","453f4f4343" ,"transacto","0679079774");


       
    echo  $res;

    }