codetech / laravel-eupago
Eupago payment gateway integration for Laravel — Multibanco, MB WAY, PayShop and PaysafeCard payments.
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0
- illuminate/broadcasting: ^10.0|^11.0|^12.0|^13.0
- illuminate/cache: ^10.0|^11.0|^12.0|^13.0
- illuminate/database: ^10.0|^11.0|^12.0|^13.0
- illuminate/http: ^10.0|^11.0|^12.0|^13.0
- illuminate/log: ^10.0|^11.0|^12.0|^13.0
- illuminate/queue: ^10.0|^11.0|^12.0|^13.0
- illuminate/routing: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- illuminate/validation: ^10.0|^11.0|^12.0|^13.0
- nesbot/carbon: ^2.0|^3.0
Requires (Dev)
- doctrine/dbal: ^3.6
- larastan/larastan: ^2.9|^3.0
- laravel/pint: ^1.0
- orchestra/testbench: ^8.0|^9.0|^10.0|^11.0
- pestphp/pest: ^2.36|^3.0
README
Laravel Eupago
Accept the payment methods used in Portugal — Multibanco references, MB WAY, PayShop, and PaysafeCard — in your Laravel application, through the Eupago payment gateway. The package covers everything from creating a payment on any of your Eloquent models to the webhook that confirms it, behind a simple API.
Quick start
composer require codetech/laravel-eupago
Publish the migrations:
php artisan vendor:publish --provider="CodeTech\EuPago\Providers\EuPagoServiceProvider" --tag=migrations
Run the migrations:
php artisan migrate
Set your Eupago credentials in .env:
EUPAGO_ENV=test EUPAGO_API_KEY=demo-xxxx-xxxx-xxxx-xxx EUPAGO_CHANNEL=demo
Add a payment method's trait to a model and create a payment — e.g. MB WAY:
use CodeTech\EuPago\Traits\HasMbWayReferences; class Order extends Model { use HasMbWayReferences; } $order = Order::find(1); $reference = $order->createMbwayReference($order->value, $order->id, '912345678');
When the customer confirms the payment, the package validates Eupago's callback, marks
the reference as paid, and fires an MBWayReferencePaid event.
Documentation
This package handles the full payment lifecycle — creating references, webhooks, status checks, refunds. To learn all about it, head over to the extensive documentation.
Upgrading from an older version? See the upgrade guide.
Changelog
Every release is documented on the GitHub releases page.
Contributing
Contributions are welcome! Please read the contributing guidelines before opening an issue or pull request.
Security
If you discover a security vulnerability, please follow the security policy — do not report it publicly.
Support
If this package helps you, consider starring the repository — it helps other developers discover it.
License
codetech/laravel-eupago is open-sourced software licensed under the MIT license.
About CodeTech
CodeTech is a web development agency based in Matosinhos, Portugal. Oh, and we LOVE Laravel!
