- What is puntodev/mercadopago-fake used for?
- It provides a fake MercadoPago integration for Laravel and PHP so you can simulate payments, preferences, and webhooks in tests and local development. It lets you exercise checkout flows without calling the real MercadoPago API. Use it when you need predictable, offline-friendly behavior instead of live API responses.
- Does this package work with Laravel?
- Yes, it is described as a fake MercadoPago integration for Laravel and PHP. It is intended to fit into Laravel applications that use MercadoPago checkout flows and need testable fakes. For exact framework version constraints, check the package's composer.json and README.
- How do I install puntodev/mercadopago-fake?
- Install it through Composer using the package name puntodev/mercadopago-fake. Since it is a fake for tests and local development, it is typically added as a dev dependency. Follow the repository README for any service provider or configuration steps.
- Can I simulate MercadoPago payments with this package?
- Yes, the package is designed to simulate payments as part of its fake MercadoPago integration. That lets you assert checkout behavior without sending real charges or calling the live API. It is intended for tests and local development, not production payment processing.
- Does it support MercadoPago preferences and webhooks?
- Yes, the overview says it can simulate payments, preferences, and webhooks. This makes it useful for testing preference creation and webhook-driven checkout flows offline. Check the README for the exact APIs exposed for each fake.
- Do I need real MercadoPago credentials to use it?
- The package is meant to avoid calling the real API, so you should not need live MercadoPago credentials for the faked flows it supports. It is built for tests and local development where predictable offline behavior is preferred. Any fake configuration keys should be documented in the repository.
- Is puntodev/mercadopago-fake safe for production?
- No, it is explicitly a fake integration for tests and local development. You should not use it to process real payments or replace the real MercadoPago API in production. Use it only in non-production environments and test suites.
- Can I use it with PHPUnit or Pest in Laravel?
- Yes, because it is a PHP/Laravel fake designed for tests, it should be usable from PHPUnit or Pest test cases in a Laravel app. It helps keep checkout tests deterministic and offline by swapping in fake MercadoPago behavior. Refer to the README for recommended test setup patterns.
- How is this different from the real MercadoPago SDK?
- The real MercadoPago SDK talks to MercadoPago's live API and can create real payments and preferences. This package provides predictable fakes for payments, preferences, and webhooks so tests and local development do not depend on the network or real credentials. It is a testing and development tool, not a production payment integration.
- Is puntodev/mercadopago-fake actively maintained and which Laravel versions are supported?
- The provided context does not specify maintenance status or exact Laravel version support. Check the GitHub repository, release history, and composer.json for current constraints and activity. Because it is a testing fake, confirm compatibility with your app's Laravel and MercadoPago integration versions before adopting it.