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/ */
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;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.