Skip to content

UnicornGlobal/lumen-cashier

 
 

Repository files navigation

lumen-cashier

A fork of laravel/cashier

Work in Progress, but all tests are passing so assume everything is fine

Install

composer require --dev unicorn/lumen-cashier

What's Changed?

  • Removed Sessions
  • Removed Views
  • JSON Responses
  • Updated Routing
  • Works in Lumen
  • Lumen Testing Tools Compatibility (wip)

What's Broken?

  • Nothing, as far as the tests are concerned. But we can't be sure, feel free to report any issues encountered

Tests

The tests in Laravel\Cashier rely on the orchestra testbench package.

That package doesn't have Lumen compatibility, so it was forked to a new Lumen compatible package.

That package contained another core package, which also needed to be a new fork. This one then contained another package for Lumen testing that had partial support, so we had to add support for that too.

An upstream PR is open for the testing tool but has not been merged by the maintainer yet. Tests are all passing for the core functionality(at least for our use case), except for custom logger tests which we've commented out for now.

NOTE: The project does not ship with a phpunit.xml file. To run tests, create one from the provided phpunit.xml.dist and add your test STRIPE_SECRET in it.

Disclaimer

Use at your own risk! This tool is work in progress and we cannot be held responsibile for anything that happens if you use this tool!

Thanks

Big ups to the team that created the parent project, laravel/cashier - this project wouldn't exist without you.

Shout out to the orchestral/testbench-core team, for the testing tools parent project, and to albertcht/lumen-testing for making the testing conversion easier.


Original Laravel Cashier Documentation Follows


Build Status Total Downloads Latest Stable Version License

Introduction

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services. It handles almost all of the boilerplate subscription billing code you are dreading writing. In addition to basic subscription management, Cashier can handle coupons, swapping subscription, subscription "quantities", cancellation grace periods, and even generate invoice PDFs.

Official Documentation

Documentation for Cashier can be found on the Laravel website.

Running Cashier's Tests

You will need to set the Stripe testing secret environment variable in a custom phpunit.xml file in order to run the Cashier tests.

Copy the default file using cp phpunit.xml.dist phpunit.xml and add the following line below the CASHIER_MODEL environment variable in your new phpunit.xml file:

<env name="STRIPE_SECRET" value="Your Stripe Secret Key"/>

Please note that due to the fact that actual API requests against Stripe are being made, these tests take a few minutes to run.

Contributing

Thank you for considering contributing to the Cashier. You can read the contribution guide lines here.

License

Laravel Cashier is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • PHP 91.7%
  • HTML 8.3%