Download the PHP package nerdysouth/stripe-bundle without Composer
On this page you can find all versions of the php package nerdysouth/stripe-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package stripe-bundle
Stripe Bundle for Symfony
Description
This bundle helps developers do a Stripe integration in a Symfony application for processing payments. The bundle allows you to generate a redirect URL for one-time or recurring subscription payments, using parameters like success URL, failure URL, amount, and optional product or subscription description. The bundle also adds a route for webhooks and fires a custom event on all webhooks from Stripe, as well as stores Transactions and their status using Doctrine, so that logging and tracking successful payments and subscriptions, and other events, is a breeze.
For now, this bundle allows you to:
- Easily create one-time and subscription payment links
- Listen and handle stripe webhooks as Symfony events
- Log & view successful payments and subscriptions in your database
Next Steps
- Add ability to pass custom metadata into transactions and subscriptions
Installation
Install the stripe-bundle package with composer:
composer require nerdysouth/stripe-bundle
Add the following lines to your config/routes.yaml file (modify the path if you prefer a different path):
Add the following lines to your config/packages/doctrine.yaml file:
Run a doctrine schema update to ensure the additional table is added:
php bin/console doctrine:schema:update -f
Generating Payment Links
Here is an example controller which will redirect the user to your payment page.
Event Handling
This bundle dispatches a NerdySouth\StripeBundle\Event\StripeEvent when a webhook is received, with a name that is equal to what Stripe uses as an event "type". For example, values like checkout.session.completed or payment_intent.succeeded - the event has methods like getEventType() and getEventData() to get the event type and the JSON data received in the webhook.
Doing custom code to update your own objects is as simple as creating your own event subscriber which listens for the events you care about.
Support & Contributing
- Please open any issues regarding new features you think would help, or bugs you find in using this application.
Contributions are welcome and encouraged. If you would like to contribute, here is how you can help:
Fork the project. Create a topic branch from master . Make some commits to improve the project. Push this branch to your GitHub project. Open a Pull Request on GitHub. Explain what your code does or how it helps.
All versions of stripe-bundle with dependencies
ext-curl Version *
symfony/framework-bundle Version 7.2.*
symfony/event-dispatcher Version 7.2.*
symfony/twig-bundle Version ^7.2
doctrine/orm Version ^3.3
stripe/stripe-php Version ^16.6