This is where your description should go. Take a look at contributing.md to see a to do list.
Via Composer
$ composer require myckhel/laravel-vtpass
The package will automatically register a service provider.
You need to publish the configuration file:
php artisan vendor:publish --provider="Myckhel\Vtpass\VtpassServiceProvider"
This is the default content of the config file vtpass.php
:
<?php
return [
"username" => env("VTPASS_USERNAME"),
"password" => env("VTPASS_PASSWORD"),
// specify to use sandbox mode or live mode
"mode" => env("VTPASS_MODE", "sandbox"), // app mode sandbox ?? live
];
Update Your Projects .env
with:
VTPASS_USERNAME=user@email.extension
VTPASS_PASSWORD=XXXXXXXXXXXXXXXXXXXX
VTPASS_MODE=sandbox
use Vtpass;
Vtpass::verify($parameters);
Vtpass::purchase($parameters);
Vtpass::status($parameters);
Vtpass::variations($parameters);
Myckhel\Vtpass\Support\MobileAirtime;
Myckhel\Vtpass\Support\MobileData;
Myckhel\Vtpass\Support\Electric;
Myckhel\Vtpass\Support\TvSub;
Myckhel\Vtpass\Support\Education;
use Myckhel\Vtpass\Support\MobileAirtime;
public function buyAirtime(){
$serviceID = 'mtn'
$phone = '111111111'
$amount = 100
return MobileAirtime::purchase([
'serviceID' => $serviceID,
'phone' => $phone,
'amount' => $amount,
]);
}
{
"code":"000",
"response_description":"TRANSACTION SUCCESSFUL",
"requestId":"SAND0192837465738253A1HSD",
"transactionId":"1563873435424",
"amount":"50.00",
"transaction_date":{
"date":"2019-07-23 10:17:16.000000",
"timezone_type":3,
"timezone":"Africa/Lagos"
},
"purchased_code":""
}
MobileAirtime::status([
'request_id' => '24545544'
]);
use Myckhel\Vtpass\Support\Electric;
$serviceID = 'ikeja-electric'
$meter = '111111111'
$type = 'prepaid'
Electric::verify([
'serviceID' => $serviceID,
'billersCode' => $meter,
'type' => $type,
]);
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author instead of using the issue tracker.
license. Please see the license file for more information.