Weave 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
Mercadopago Fake

Mercadopago Fake Laravel Package

puntodev/mercadopago-fake

A Laravel/PHP package for faking Mercado Pago in tests. Simulate preferences, payments, webhooks, and API responses without real credentials or network calls, enabling fast, deterministic feature tests and safe local development.

View on GitHub
Deep Wiki
Context7

A lightweight Laravel package for testing integrations with MercadoPago without hitting the real API. It provides a fake client that returns predictable responses, making payment flows safe, fast, and deterministic in your test suite.

  • Drop-in replacement for the MercadoPago SDK/client
  • Simulates payment, preference, and refund responses
  • Supports custom fake responses and failure scenarios
  • Enables fluent assertions on outgoing requests
  • Keeps tests isolated with no network calls or credentials
Frequently asked questions about Mercadopago Fake
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.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib