The goal of this package is to make testing stripe webhooks easy on a local machine without the use
of ngrok or other similar tunneling services. The package will simulate a post
request to a specified
endpoint with a json containing event data and make sure that your application reacts accordingly.
Via Composer
$ composer require TeamTNT/php-stripe-webhook-tester 1.0.*
$tester = new TeamTNT\Stripe\WebhookTester();
$tester->setVersion('2014-09-08');
$tester->setEndpoint('http://local.dev/stripe/webhooks');
$response = $tester->triggerEvent('charge.succeeded');
For your convenience you can use chained methods
$tester = new TeamTNT\Stripe\WebhookTester('http://local.dev/stripe/webhooks);
$response = $tester->setVersion('2014-09-08')->triggerEvent('charge.succeeded');
Available versions and events can be found in the webhooks directory
$ phpunit
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.