regiosoft / stripe-bundle
A simple Symfony bundle for Stripe API.
Installs: 142
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Type:symfony-bundle
Requires
- php: >=7.1
- stripe/stripe-php: ^7.27
- symfony/config: ^3.0 || ^4.0
- symfony/dependency-injection: ^3.0 || ^4.0
- symfony/framework-bundle: ^3.0 || ^4.0
- symfony/http-foundation: ^3.0 || ^4.0
- symfony/http-kernel: ^3.0 || ^4.0
- symfony/options-resolver: ^3.0 || ^4.0
- symfony/validator: ^3.0 || ^4.0
This package is auto-updated.
Last update: 2024-03-29 04:26:39 UTC
README
A simple Symfony bundle for Stripe Api.
Only SMS/WhatsApp!
Setup
Step 1: Download RegiosoftStripeBundle using composer
Add Stripe Bundle in your composer.json:
{ "require": { "regiosoft/stripe-bundle": "^1.0" } }
Now tell composer to download the bundle by running the command:
$ php composer.phar update "regiosoft/stripe-bundle"
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Regiosoft\StripeBundle\RegiosoftStripeBundle() ); }
Step 3: Add configuration
# app/config/config.yml regiosoft: stripe: stripe_private_key: %stripe_private_key%
Usage
Using service
<?php $stripeClient = $this->get('stripe_client'); ?>
##Example
###Create customer & subscription
<?php $customer = $stripeClient->createCustomer($token, $email, $name, $phone); // Store customer information $subsciption = $stripeClient->createSubscription($customerId, $planId); // Store subscription information ?>