New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mockcard/laravel

MockCard for Laravel: probe-guard middleware, chaos runs from Artisan and Pest/PHPUnit.
1
Install
composer require mockcard/laravel
Latest Version:v2.0.0
PHP:>=8.2
Laravel:11 · 12
License:MIT
Last Updated:Nov 23, 2026
Links: GitHub  ·  Packagist
Maintainer: arixevalabs

mockcard/laravel

MockCard for Laravel: guard your payment webhook routes against MockCard's production probes, and run payment chaos scenarios from Artisan or your Pest/PHPUnit suite. Built on mockcard/mockcard-php.

Author: Arixeva Labs hello@arixevalabs.com · mockcard.io · MIT

composer require mockcard/laravel

.env: MOCKCARD_API_KEY, MOCKCARD_PROJECT_ID, MOCKCARD_PROBE_SECRET (from the MockCard dashboard).

Probe guard

Route::post('/webhooks/stripe', StripeWebhookController::class)->middleware('mockcard.probe');

Verified MockCard probes get 200 + MockCard-Probe-Ack: skipped; your controller never sees them. Works with Laravel Cashier's webhook route too.

CI: Artisan

- run: php artisan serve --port=8000 &
- run: php artisan mockcard:chaos http://127.0.0.1:8000/webhooks/stripe --min-score=100

Pest / PHPUnit, with outcome assertions

use MockCard\ChaosRunner;
use MockCard\Testing\AssertsChaosRun;

uses(AssertsChaosRun::class);

it('survives payment chaos', function () {
    $run = app(ChaosRunner::class)->run(
        config('mockcard.project_id'),
        'http://127.0.0.1:8000/webhooks/stripe',
        assertions: ['duplicate' => ['order fulfilled once' => fn () => Order::where('status', 'paid')->count() === 1]],
    );
    $this->assertChaosRunPassed($run);
});

The MockCard facade exposes the API client: MockCard::listProjects(), MockCard::createRun([...]).

Related Packages

ideacrafters/eloquent-payable

A Laravel package that enables any Eloquent model to accept payments by adding a...

2,084 1
cboxdk/laravel-billing-stripe

Cbox Billing — Stripe payment-gateway adapter: a PaymentGateway implementation b...

1,876 0
mdiqbal/laravel-payments

A unified payment gateway package for Laravel supporting 21 payment providers

191 3
hestalabs/payments

This is simple and easy to use Laravel and Lumen package for using multiple paym...

38 14
goldnead/statamic-payments

Take payments in Statamic with Mollie or Stripe: hosted checkout, a webhook that...

8,456 0

Version History

Version Released PHP Laravel License
v2.0.0 >=8.2 ^11.0|^12.0 MIT