Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Mangopay Bundle

Mangopay Bundle Laravel Package

appventus/mangopay-bundle

View on GitHub
Deep Wiki
Context7

This Bundle include Mangopay php sdk as a service

Frequently asked questions about Mangopay Bundle
Is Troopers/MangopayBundle compatible with Laravel, or is it strictly for Symfony?
While originally a Symfony bundle, Troopers/MangopayBundle can be adapted for Laravel via Symfony’s Bridge component or standalone SDK usage. Laravel developers often integrate it by leveraging Symfony’s Container or using the underlying Mangopay PHP SDK directly. Check the [Troopers documentation](https://github.com/Troopers/MangopayBundle) for Laravel-specific examples or community forks.
What Laravel versions does this bundle support, and are there PHP version requirements?
Troopers/MangopayBundle is Symfony-focused, but Laravel 8.x/9.x/10.x can use it via Symfony’s Bridge or the standalone Mangopay PHP SDK (v3.x). PHP 8.0+ is required for security and compatibility. The bundle itself drops PHP 5.x support, so ensure your Laravel environment meets these minimums. Test thoroughly with your Laravel version’s Symfony components.
How do I handle Mangopay webhooks in Laravel if this bundle is Symfony-based?
For Laravel, bypass the Symfony EventDispatcher and use Laravel’s built-in routing or queue workers to process webhooks. The Mangopay PHP SDK (v3.x) provides raw webhook payloads—validate signatures manually and dispatch events via Laravel’s `Event` facade or queues. Avoid coupling to Symfony’s `EventDispatcher` unless using Symfony’s Bridge.
Does this bundle support sandbox/testing environments for Mangopay API?
Yes, configure the bundle or SDK with Mangopay’s sandbox credentials (client ID/secret) via Laravel’s `.env` or config files. The Troopers bundle follows Symfony’s parameter system, but Laravel can override these in `config/services.php`. Always test webhooks and API calls in sandbox before going live.
Are there alternatives to Troopers/MangopayBundle for Laravel that avoid Symfony dependencies?
For a pure Laravel solution, use the [official Mangopay PHP SDK (v3.x)](https://github.com/mangopay/php-sdk) directly. Wrap it in a service class for dependency injection (e.g., `MangopayService`) and handle webhooks via Laravel routes or queues. Avoid Symfony bundles unless you’re using Symfony’s Bridge or have a multi-framework project.
How do I configure API credentials securely in Laravel with this bundle?
Store Mangopay credentials in Laravel’s `.env` (e.g., `MANGOPAY_CLIENT_ID`, `MANGOPAY_SECRET`) and bind them in `config/services.php`. The Troopers bundle expects Symfony’s `parameters.yml`, but Laravel can inject these via environment variables or a custom credential provider. Never hardcode secrets in config files.
What’s the best way to test Mangopay interactions in Laravel CI/CD?
Mock the Mangopay SDK in Laravel tests using PHPUnit’s `Mockery` or `createMock()`. Test webhook routes with `Http::fake()` and validate payloads. For API calls, use `MangopayClient::create()` with sandbox credentials. Ensure tests cover error cases (e.g., failed transactions, webhook signature validation).
Will this bundle work with Laravel’s queue system for async Mangopay operations?
Yes, dispatch Mangopay operations (e.g., refunds, payouts) to Laravel queues using `dispatch()` or `dispatchSync()`. The SDK’s async methods (e.g., webhooks) can trigger queue jobs via route middleware. Example: `RefundJob::dispatch($transactionId)`. Configure queue workers to handle retries and failures.
Are there known issues with the bundle in production, like rate limits or timeouts?
The underlying Mangopay SDK handles retries and timeouts, but Laravel may need adjustments. Configure SDK timeouts (e.g., `Guzzle` client options) and monitor queue jobs for failed Mangopay calls. Use Laravel’s `retryAfter()` for exponential backoff. Test under load to validate performance.
How do I migrate from the old appventus/mangopay-bundle to Troopers/MangopayBundle?
Replace the Composer package (`composer require troopers/mangopay-bundle`) and update Symfony-specific configs (e.g., `config.yml` → Laravel’s `config/services.php`). Adapt webhook handlers to Laravel routes and drop Symfony dependencies like `EventDispatcher`. Test thoroughly, as the bundle’s architecture differs slightly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware