catch-of-the-day / stripe-webhook-bundle
A Symfony 2 bundle for handling Stripe Webhooks.
Installs: 49 886
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 27
Forks: 2
Type:symfony-bundle
Requires
- php: >=5.3.10
Requires (Dev)
- doctrine/doctrine-bundle: 1.0.*
- symfony/yaml: 2.1.*
- twig/twig: *
This package is not auto-updated.
Last update: 2024-12-25 08:47:50 UTC
README
A Symfony 2 bundle for handling Stripe Webhooks.
Features:
- Triggers a Symfony event from a Stripe Webhook event.
Status
WIP
Installation
Step 1:
Add MRPStripeWebhookBundle to your composer.json:
{ "require": { "mrp/stripe-webhook-bundle": "*" } }
Now tell composer to download the bundle by running the command:
$ php composer.phar update mrp/stripe-webhook-bundle
Step 2:
Enable this bundle in your kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // … new MRP\StripeWebhookBundle\MRPStripeWebhookBundle() ); }
Step 3:
Import the MRPStripeWebhookBundle routing files:
In YAML:
# app/config/routing.yml mrp_stripe_webhook: resources: "@MRPStripeWebhookBundle/Resources/config/routing/routing.yml" prefix: /
Webhooks
This bundle receives webhooks at "/stripe-webhooks" and dispatches the event which you can listen for.
For example: the 'charge.succeeded' event is dispatched as 'mrp_stripe_webhook.charge.succeeded'