Download the PHP package tijmen-wierenga/laravel-chargebee without Composer

On this page you can find all versions of the php package tijmen-wierenga/laravel-chargebee. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-chargebee

LaravelChargebee

Latest Version on Packagist Build Status Total Downloads

A Laravel package which provides an easy way to handle billing and subscriptions by making use of Chargebee's subscription software.

Introduction

LaravelChargebee (LC) is a membership management tool which handles your billing and recurring subscriptions with minimal effort. This easy-to-install package will cover the most important features for a successful subscription system:

Install

If you haven't got an account on Chargebee, create one here.

Then require the package into your project via Composer:

Next, register the service provider in config/app.php:

Add the LaravelChargebee traits to your model:

If you want to use the package's routes for handling webhooks, make sure you place the service provider before the Route Service Prodiver (App\Providers\RouteServiceProvider::class).

Next, run the following command in your terminal:

This will copy and run the migrations necessary for the package to work. It also copies the configuration file to your config path.

There are also a few environment variables that need to be added to the .env-file:

If you want to use a different payment gateway, define your payment gateway details in the .env-file:

Usage

Creating a new subscription:

You can create subscriptions in multiple ways:

Create a subscription with Chargebee's Hosted Page

Retrieve a hosted page URL:

The $embed variable is a boolean value which describes whether or not you want to embed the hosted page as an i-frame.

You can now choose between redirecting the user to the hosted page, or send it to a view where you can render it:

Redirect

Return it as a variable in your view

Next, render it in your view:

You can fully customize your hosted page on Chargebee, an example is shown below:

Chargebee's Hosted Page example

On success, Chargebee will redirect to their own success page by default, but to register the subscription in our own application, we need to redirect back to our application. To define this redirect, setup a callback route:

Add the route and make a call to the registerFromHostedPage method from the controller:

The subscription is now registered in both Chargebee and your own application. I coulnd't be easier!

Example

Subscription Controller

Subscriptions with Stripe/Braintree

In order to create subscriptions with Stripe and Braintree, you need to make use of their Javascript libraries. More info on subscribing with Stripe and Braintree can be found below:

To create a subscription with Braintree or Stripe you'll have to add a credit card token:

You can also add add-ons to a subscription:

Or redeem a coupon:

Changing plans

Cancelling a subscription

Testing

If you want to run the unit tests for this package you need acquire test tokens from Stripe. To be able to fetch a test token create an .env-file in the base directory and add your stripe secret token:

To run the PHPUnit tests, run the following composer command from the base directory:

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-chargebee with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.1
illuminate/database Version ~5.1
illuminate/console Version ~5.1
php Version ~5.5|~7.0
chargebee/chargebee-php Version ^1.6
stripe/stripe-php Version ^3.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tijmen-wierenga/laravel-chargebee contains the following files

Loading the files please wait ....