Download the PHP package ameotoko/stripe-bundle without Composer
On this page you can find all versions of the php package ameotoko/stripe-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ameotoko/stripe-bundle
More information about ameotoko/stripe-bundle
Files in ameotoko/stripe-bundle
Package stripe-bundle
Short Description Simple Stripe controller for Contao 4
License LGPL-3.0-or-later
Informations about the package stripe-bundle
Simple Stripe bundle for Contao 4
The bundle sets up basic environment, if you want to start using Stripe in your Contao application.
API key parameters
Add your API keys to the bundle config, and they will also become available as container parameters:
Then use it in your own services if you need:
IMPORTANT: store your production API keys in environment variables, to avoid committing them to version control:
Endpoints
Endpoint | Route | Response (success) | Response (error) |
---|---|---|---|
/_stripe/payment |
stripe_create_payment_intent |
{"clientSecret": string} |
HTTP 500 {"error": string} |
/_stripe/checkout |
stripe_create_checkout_session |
{"url": string} |
HTTP 500 {"error": string} |
/_stripe/webhook |
stripe_webhook |
HTTP 200 (empty) | HTTP 400 (empty) |
The bundle creates 2 endpoints in your application, which you can call from your Javascript to create payment intents or checkout sessions:
The bundle also sets up a webhook endpoint /_stripe/webhook
, which you can configure in your Stripe account, e.g. https://example.com/_stripe/webhook
.
Then, you can process any events, that Stripe sends to your webhook endpoint, by setting up an EventListener
, that listens to events like 'stripe.' + Stripe event name. For example, if you want to process Stripe's checkout.session.completed
:
Events
stripe.create_checkout.pre
(receives data object you've sent from your frontend, before sending it to Stripe)stripe.create_checkout.post
(receives the response fromStripe\Checkout\Session::create()
)stripe.<STRIPE_WEBHOOK_EVENT>
Contao is an Open Source PHP Content Management System for people who want a professional website that is easy to maintain. Visit the project website for more information.
All versions of stripe-bundle with dependencies
contao/core-bundle Version ^4.12
stripe/stripe-php Version ^7.67
symfony/config Version ^5.4
symfony/dependency-injection Version ^5.4
symfony/http-kernel Version ^5.4