PHPackages                             angelbachev/epay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. angelbachev/epay

ActiveLibrary[Payment Processing](/categories/payments)

angelbachev/epay
================

Epay.bg API wrapper for Laravel 5.\*

1.0.2(8y ago)72.0k10[1 PRs](https://github.com/angelbachev/epay/pulls)MITPHPPHP &gt;=5.3.0

Since Feb 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/angelbachev/epay)[ Packagist](https://packagist.org/packages/angelbachev/epay)[ Docs](https://github.com/angelbachev/laravel-epay)[ RSS](/packages/angelbachev-epay/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel-epay API
================

[](#laravel-epay-api)

Laravel wrapper for the Epay.bg API. Working with laravel 5.1

Install
-------

[](#install)

Via Composer

```
$ composer require angelbachev/epay
```

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

```
AngelBachev\Epay\EpayServiceProvider::class

```

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

```
'Epay' => AngelBachev\Epay\Facades\Epay::class

```

- Run one of the following commands to publish package configuration depending on your needs:
    - To publish only **angelbachev/epay** package configuration:

    ```
    php artisan vendor:publish --provider="AngelBachev\Epay\EpayServiceProvider"

    ```

    - To publish configuration of all packages you use:

    ```
    php artisan vendor:publish --tag="config"

    ```

    - To publish all assets of all packages:

    ```
    php artisan vendor:publish

    ```
- Add the following lines to your .env file

```
# Epay configuration values
EPAY.mode=stage   # if you want to make real payments set this to prod
# Settings for testing purposes
EPAY.stage.client_id=   #Add your Customer number
EPAY.stage.secret=      #Add your Secret key
EPAY.stage.success_url= #URL where you want the customer to be redirected after confirming payment
EPAY.stage.cancel_url=  #URL where you want the customer to be redirected if he rejects the payment
# Production settings
EPAY.prod.client_id=    #Add your Customer number
EPAY.prod.secret=       #Add your Secret key
EPAY.prod.success_url=  #URL where you want the customer to be redirected after confirming payment
EPAY.stage.cancel_url=  #URL where you want the customer to be redirected if he rejects the payment

```

Usage
-----

[](#usage)

```
    $invoice     = mt_rand(1, 1000000);
    $amount      = 150.63;
    $expiration  = '01.03.2016 08:30:00';
    $description = 'Invoice Description';

    Epay::setData(
        $invoice,     // accepts only positive integer values
        $amount,      // accepts only positive integers and float numbers with 1 or 2 digits after decimal point
        $expiration,  // accepts time in format DD.MM.YYYY[ hh:mm[:ss]]
        $description, // max length 100 symbols
        [$currency],  // optional, accepts only "BGN", "USD", "EUR" ("BGN" by default)
        [$encoding]   // optional, accepts only "utf-8"
    );
```

### Notification receive route (POST)

[](#notification-receive-route-post)

```
    Route::post('receive', function() { # replace 'receive' with your real route for handling Epay notifications

        $receiver = Epay::receiveNotification(Input::all());

        /**
        * Update order or status of payment
        *
        *    array (
        *      'invoice' => '1500',
        *      'status' => 'PAID',
        *      'pay_date' => '20160221143730',
        *      'stan' => '036257',
        *      'bcode' => '036257',
        *    ),
        *
        **/
        // Do something with the response
        foreach($receiver['items'] as $item) {
            Log::info($item);
            Log::info($item['status']);
            Log::info($item['invoice']);
        }

        return $receiver['response'];
    });
```

### Form in view

[](#form-in-view)

```

        {!! Epay::generateHiddenInputs() !!}

        // your code here

        Send

```

Support
-------

[](#support)

This package only supports Laravel 5 &amp; Laravel 5.1 &amp; 5.2 at the moment.

- 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
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- \[epay.bg demo packages\]\[\]

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~293 days

Total

3

Last Release

3196d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17396581?v=4)[angelbachev](/maintainers/angelbachev)[@angelbachev](https://github.com/angelbachev)

---

Top Contributors

[![angelbachev](https://avatars.githubusercontent.com/u/17396581?v=4)](https://github.com/angelbachev "angelbachev (5 commits)")

---

Tags

epayAngel Bachev

### Embed Badge

![Health badge](/badges/angelbachev-epay/health.svg)

```
[![Health](https://phpackages.com/badges/angelbachev-epay/health.svg)](https://phpackages.com/packages/angelbachev-epay)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
