2017 © Pedro Peláez
 

library epay

Laravel epay.bg api integration

image

dgeorgiev/epay

Laravel epay.bg api integration

  • Saturday, June 4, 2016
  • by dgeorgiev
  • Repository
  • 2 Watchers
  • 4 Stars
  • 49 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

Laravel-epay API

Laravel wrapper for the Epay.bg API. Working with laravel 5.1, (*1)

Install

Via Composer, (*2)

``` bash $ composer require dgeorgiev/epay, (*3)


* Add the service provider to your $providers array in config/app.php file like:

Dgeorgiev\Epay\EpayServiceProvider::class, (*4)


* Add the alias to your $aliases array in config/app.php file like:

Epay' => Dgeorgiev\Epay\Facades\Epay::class, (*5)


* Run the following command to publish configuration:

php artisan vendor:publish, (*6)



## Usage ``` php $invoice = sprintf("%.0f", rand(1, 50) * 105); $amount = '22,80'; $expiration = '01.08.2020'; $description = 'Test'; Epay::setData( $invoice, $amount, $expiration, $description );

Notification receive route (POST)

``` PHP Route::post('receive', function(){, (*7)

    $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 in view
<form action="{{ Epay::getSubmitUrl() }}" method="post">
    {!! Epay::generateHiddenInputs() !!}

    // your code here

    <button type=submit>Изпрати</button>
</form>

```, (*8)

Support

This package only supports Laravel 5 & Laravel 5.1 at the moment., (*9)

  • In case of any issues, kindly create one on the Issues section.
  • If you would like to contribute:
    • Fork this repository.
    • Implement your features.
    • Generate pull request.

Change log

Please see CHANGELOG for more information what has changed recently., (*10)

Security

If you discover any security related issues, please email me@dgeorgiev.biz instead of using the issue tracker., (*11)

Credits

epay.bg demo packages, (*12)

License

The MIT License (MIT). Please see License File for more information., (*13)

https://packagist.org/packages/dgeorgiev/epay, (*14)

The Versions

04/06 2016

dev-master

9999999-dev https://github.com/dgeorgiev/laravel-epay

Laravel epay.bg api integration

  Sources   Download

MIT

The Requires

 

epay laravel epay

04/12 2015

1.0.0

1.0.0.0 https://github.com/dgeorgiev/laravel-epay

Laravel epay.bg api integration

  Sources   Download

MIT

The Requires

 

epay laravel epay