Package Data | |
---|---|
Maintainer Username: | dgeorgiev |
Maintainer Contact: | me@dgeorgiev.biz (Daniel Georgiev) |
Package Create Date: | 2015-12-04 |
Package Last Update: | 2016-06-04 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-21 03:02:22 |
Package Statistics | |
---|---|
Total Downloads: | 152 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 7 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 5 |
Laravel wrapper for the Epay.bg API. Working with laravel 5.1
Via Composer
$ composer require dgeorgiev/epay
Dgeorgiev\Epay\EpayServiceProvider::class
Epay' => Dgeorgiev\Epay\Facades\Epay::class
php artisan vendor:publish
$invoice = sprintf("%.0f", rand(1, 50) * 105);
$amount = '22,80';
$expiration = '01.08.2020';
$description = 'Test';
Epay::setData(
$invoice,
$amount,
$expiration,
$description
);
Route::post('receive', function(){
$receiver = Epay::receiveNotification(Request::all());
/**
* Update order or status of payment
*
* array (
* 'invoice' => '1890',
* 'status' => 'PAID',
* 'pay_date' => '20151204143730',
* 'stan' => '036257',
* 'bcode' => '036257',
* ),
*
**/
foreach($receiver['items'] as $item){
Log::info($item);
Log::info($item['status']);
Log::info($item['invoice']);
}
return $receiver['response'];
});
<form action="{{ Epay::getSubmitUrl() }}" method="post">
{!! Epay::generateHiddenInputs() !!}
// your code here
<button type=submit>Изпрати</button>
</form>
This package only supports Laravel 5 & Laravel 5.1 at the moment.
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email me@dgeorgiev.biz instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
https://packagist.org/packages/dgeorgiev/epay