PHP code example of alphaolomi / php-evpay

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

    

alphaolomi / php-evpay example snippets


use Alphaolomi\EvPay\EvPayService;

$evPayClient = new EvPayService([
    'name' => 'E-learning Platform',
    'username' => 'username',
    'callback' => 'https://e-learn-platform.com/callback',
]);

$response =  $evPayClient->paymentRequest([
    'mobileNo' => '0747991498',
    'amount' => 3000,
    'product' => 'Monthly Subscription',
    'network' => 'Mpesa',
]);

var_dump($response);