Ek Stripe Payment Bundle
About
EKSTripePaymentBundle is the most advanced stripe php api for symfony2.
It helps you:
- Make instant payments via Stripe form
- Create a customer
- Create a plan
- Subscribe to a plan and cancel subscribtion
- never credit card numbers inside your server, (*1)
This bundle is build on CABIN design pattern., (*2)
Requirements
Require PHP version 5.3 or greater., (*3)
Installation
Register the bundle in your composer.json, (*4)
{
"require": {
"edouardkombo/ek-stripe-payment-bundle": "dev-master"
}
}
Now, install the vendor, (*5)
php composer.phar install
Register MultiStepFormsBundle namespace in your app/appKernel.php, (*6)
new EdouardKombo\EkStripePaymentBundle\EkStripePaymentBundle(),
Documentation
Copy config parameters in app/config/config.yml:, (*7)
ek_stripe_payment:
current_environment: 'test' #test or live allowed
default_currency: 'EUR'
api_url: 'https://api.stripe.com/v1'
charges_suburl: '/charges'
customers_suburl: '/customers'
plans_suburl: '/plans'
subscriptions_suburl: '/subscriptions'
invoices_suburl: '/invoices'
api_checkout_url: 'https://checkout.stripe.com/checkout.js'
api_version: '2014-01-31'
test:
secret_api: 'sk_test_xxxxxxxxxxxxxxxxxxxxxxxx'
publishable_api: 'pk_test_xxxxxxxxxxxxxxxxxxxxxxxx'
live:
secret_api: 'sk_live_xxxxxxxxxxxxxxxxxxxxxxxx'
publishable_api: 'pk_live_xxxxxxxxxxxxxxxxxxxxxxxx'
And, copy route in app/config/routing.yml, (*8)
ek_stripe_payment:
resource: "@EkStripePaymentBundle/Resources/config/routing.yml"
prefix: /{_locale}/payment
To see a concrete live example, these are some links you can test the bundle with:, (*9)
http://localhost/app_dev.php/{your_locale}/payment/card #List of payment buttons for instant payment and subscriptions
http://localhost/app_dev.php/{your_locale}/payment/plan #Create a plan
All you have to is taking a look at: Controller/StripeController.php file., (*10)
NB: This bundle is evolving quickly, but you can now use it in production., (*11)
Contributing
Each project has its own specifities. Feel free to help me involve this bundle with your needs.
If you want to help me improve this bundle, please make sure it conforms to the PSR coding standard. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed version., (*12)
Issues
Bug reports and feature requests can be submitted on the Github issues tracker., (*13)
For further informations, contact me directly at edouard.kombo@gmail.com., (*14)