A simple Symfony bundle for Stripe Api.
Add Stripe Bundle in your composer.json:
{
"require": {
"driveop/stripe-bundle": "^1.0"
}
}
Now tell composer to download the bundle by running the command:
$ php composer.phar update "driveop/stripe-bundle"
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new DriveOp\StripeBundle\DriveOpStripeBundle()
);
}
# app/config/config.yml
driveop:
stripe:
stripe_private_key: %stripe_private_key%
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
?>
How can I help you explore Laravel packages today?