Download the PHP package flosch/stripe-bundle without Composer
On this page you can find all versions of the php package flosch/stripe-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flosch/stripe-bundle
More information about flosch/stripe-bundle
Files in flosch/stripe-bundle
Package stripe-bundle
Short Description Symfony 3 bundle to easily integrate Stripe's webpayment SDK into a Symfony project.
License MIT
Homepage https://github.com/flo-sch/stripe-bundle.git
Informations about the package stripe-bundle
flosch/stripe-bundle
A symfony >= 3 integration for the Stripe PHP SDK
⚠️ IMPORTANT: Before you use this bundle... ⚠️
Some (rather big!) changes are coming quite soon affecting online payment solutions in Europe, impacting the Stripe APIs used by this bundle. Read this issue carefully before using this bundle.
Description
This bundle allow you to manipulate the stripe SDK as a Symfony service, Plus some helpers to use different Stripe API notions such as Stripe Connect or the Subscriptions API.
NOTE : The master branch, and 1.. releases target Symfony 3. If you are using Symfony 4, please use the 2.0.0 branch and the 2.. releases of this bundle.
Installation
To install this bundle, run the command below and you will get the latest version from [Packagist][3].
Load required bundles in AppKernel.php:
And set-up the required configuration
Usage
Then, it is possible to use this service from inside a controller
The StripeClient php class extends the default Stripe PHP SDK class, allowing you to do anything that this SDK can do. Plus, it will automatically be authenticated with your Stripe API Key, which you do not have to worry about at all.
Extends the client
I will always be open to PR in order to update this project, However if you wish to add your own custom helpers, you can easily extend it yourself, for instance :
Then register your extension as a service, and use it.
http://symfony.com/doc/current/service_container/3.3-di-changes.html
Helpers
The StripeClient currently offers four helper methods :
Retrieve a Coupon by its ID
Retrieve a Plan by its ID
Retrieve a Customer by its ID
Retrieve a Charge by its ID
Create a new customer
Create and subscribe a new customer to an existing plan
Subscribe an existing customer to an existing plan
Create a charge (to a platform, or a connected Stripe account)
Refund a Charge
All versions of stripe-bundle with dependencies
stripe/stripe-php Version ~3.23
ocramius/proxy-manager Version ~1.0.2 || ^2.0