PHP code example of imransaleem / telenor-integration

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

    

imransaleem / telenor-integration example snippets


'providers' => [
    ImranSaleem\TelenorIntegration\TelenorIntegrationServiceProvider::class,
],

'aliases' => [
    'Telenor' => ImranSaleem\TelenorIntegration\Facades\Telenor::class,
],

$login = Telenor::login();

if ($login['ResponseCode'] === '0') {
    $inquiry = Telenor::inquiry(
        $login['Timestamp'],
        $beneficiary, // object with contact_number and cnic
        $amount  // amount to disburse
    );
}

if ($inquiry['ResponseCode'] === '0') {
    $transfer = Telenor::transfer(
        $login['Timestamp'],
        $beneficiary,
        $amount
    );
}
bash
php artisan vendor:publish --tag=telenor-config
bash
php artisan migrate