PHPackages                             zamblas/laravel-eupago - 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. zamblas/laravel-eupago

ActiveLibrary

zamblas/laravel-eupago
======================

A Laravel package for making payments through the EuPago API.

v1.1.22(1y ago)040MITPHPPHP ^7.3|^8.0

Since Jun 19Pushed 1y agoCompare

[ Source](https://github.com/zamblas/laravel-eupago)[ Packagist](https://packagist.org/packages/zamblas/laravel-eupago)[ RSS](/packages/zamblas-laravel-eupago/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (29)Used By (0)

[![laravel-eupago-repo-banner](https://user-images.githubusercontent.com/17640929/161711354-03727be1-88cb-49df-ad58-494a61606e0b.png)](https://user-images.githubusercontent.com/17640929/161711354-03727be1-88cb-49df-ad58-494a61606e0b.png)

Laravel EuPago
==============

[](#laravel-eupago)

A Laravel package for making payments through the EuPago API.

[![Latest version](https://camo.githubusercontent.com/5fde63965e2292cc39229e750ff7ca24c39ccaf907fc7cc92a178b2fbcce792c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f436f6465546563684167656e63792f6c61726176656c2d65757061676f3f7374796c653d666c61742d737175617265)](https://github.com/CodeTechAgency/laravel-eupago/releases)[![GitHub license](https://camo.githubusercontent.com/a01e9e0bd15afee532c691ecf55901ba0588a93448447050c2cdfe47a2d4a7cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f436f6465546563684167656e63792f6c61726176656c2d65757061676f3f7374796c653d666c61742d737175617265)](https://github.com/CodeTechAgency/laravel-eupago/blob/master/LICENSE)

Installation
------------

[](#installation)

Install the PHP dependency

```
composer require codetech/laravel-eupago

```

Publish the migration

```
php artisan vendor:publish --provider=CodeTech\\EuPago\\Providers\\EuPagoServiceProvider --tag=migrations

```

Run the migration

```
php artisan migrate

```

Publish the configuration file (optional)

```
php artisan vendor:publish --provider=CodeTech\\EuPago\\Providers\\EuPagoServiceProvider --tag=config

```

Publish the translations files (optional)

```
php artisan vendor:publish --provider=CodeTech\\EuPago\\Providers\\EuPagoServiceProvider --tag=translations

```

Configurations
--------------

[](#configurations)

### Environment

[](#environment)

There are two environments available for you to use: "test" and "prod". As you may have guessed, you can use the "test" environment during the development stage of your application. Switch to "prod" environment when your application is ready for production.

### MB References

[](#mb-references)

#### Usage

[](#usage)

For creating a MB reference, take the following example:

```
use CodeTech\EuPago\MB\MB;

$order = Order::find(1);

$mb = new MB(
    $order->value,
    $order->id,
    $order->date,
    $order->payment_limit_date,
    $order->value,
    $order->value,
    0 // allows duplicated payments
);

try {
    // Make the request to EUPago's API
    $mbReferenceData = $mb->create();

    if ($mb->hasErrors()) {
        // handle errors
    }

    // Make the request to EUPago's API
    $order->mbReferences()->create($mbReferenceData);
} catch (\Exception $e) {
    // handle exception
}

```

`$referenceData` will contain all the information about the payment:

```
[
    'success' => true,
    'state' => 0,
    'response' => "OK",
    'reference' => "000001236",
    'value' => "3.00000",
]

```

Use the trait on the models for which you want to generate MB references:

```

use CodeTech\EuPago\Traits\Mbable;

class Order extends Model
{
    use Mbable;

```

Retrieve the MB references:

```
$order = Order::find(1);

$mbReferences = $order->mbReferences;

```

#### Callback

[](#callback)

The package already handles the callback, updating the payment reference state and triggering an `MBWayReferencePaid` event.

```
GET

/eupago/mb/callback

```

\####Params

NameTypevalorfloatcanalstringreferenciastringtransacaostringidentificadorintegermpstringchave\_apistringdatadate timeentidadestringcomissaofloatlocalstring### MB Way References

[](#mb-way-references)

#### Usage

[](#usage-1)

Use the trait on the models for which you want to generate MB Way references:

```

use CodeTech\EuPago\Traits\Mbwayable;

class Order extends Model
{
    use Mbwayable;

```

Retrieve the MB Way references:

```
$order = Order::find(1);

$mbwayReferences = $order->mbwayReferences;

```

#### Callback

[](#callback-1)

The package already handles the callback, updating the payment reference state and triggering an `MBWayReferencePaid` event.

```
GET

/eupago/mbway/callback

```

\####Params

NameTypevalorfloatcanalstringreferenciastringtransacaostringidentificadorintegermpstringchave\_apistringdatadate timeentidadestringcomissaofloatlocalstring---

License
-------

[](#license)

**codetech/laravel-eupago** is open-sourced software licensed under the [MIT license](https://github.com/CodeTechAgency/laravel-eupago/blob/master/LICENSE).

About CodeTech
--------------

[](#about-codetech)

[CodeTech](https://www.codetech.pt) is a web development agency based on Matosinhos, Portugal. Oh, and we LOVE Laravel!

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~45 days

Recently: every ~107 days

Total

28

Last Release

560d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.0.3PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7000c0bbc5a7597e5fe4fb9506bd84604a527ca07bbf0c1623df981357372b7b?d=identicon)[zamblas](/maintainers/zamblas)

---

Top Contributors

[![jfrosorio](https://avatars.githubusercontent.com/u/17640929?v=4)](https://github.com/jfrosorio "jfrosorio (14 commits)")[![sergio-dotpro](https://avatars.githubusercontent.com/u/53762125?v=4)](https://github.com/sergio-dotpro "sergio-dotpro (12 commits)")[![zamblas](https://avatars.githubusercontent.com/u/16827836?v=4)](https://github.com/zamblas "zamblas (5 commits)")

---

Tags

laravelEupagocodetechmb referenceslaravel-eupagoreferências multibancombway references

### Embed Badge

![Health badge](/badges/zamblas-laravel-eupago/health.svg)

```
[![Health](https://phpackages.com/badges/zamblas-laravel-eupago/health.svg)](https://phpackages.com/packages/zamblas-laravel-eupago)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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