Package Data | |
---|---|
Maintainer Username: | travoltron |
Maintainer Contact: | ben@travoltron.com (Ben Warburton) |
Package Create Date: | 2016-08-09 |
Package Last Update: | 2016-10-04 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-23 03:17:04 |
Package Statistics | |
---|---|
Total Downloads: | 35 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 10 |
Total Watchers: | 2 |
Total Forks: | 2 |
Total Open Issues: | 0 |
Via Composer
$ composer require travoltron/cashier-extras
Add the following to config/app.php
:
Travoltron\CashierExtras\CashierExtrasServiceProvider::class,
This package adds a few interactive CLI tools to make working with Stripe and Laravel's Cashier package a little bit easier. For now it supports creating, listing, and deleting both Stripe Plans and Coupons.
The Laravel Cashier package documentation states that to run it's own suite of tests, some plans and a coupon need to be added to your Stripe account.
The added commands are as follows:
###Cashier Testing
php artisan cashier:test-data
This adds the needed plans and coupons for Laravel Cashier testing.
###Check Stripe Keys
php artisan stripe:check-keys
This checks that the .env
file has been populated with the correct keys and checks at a very loose level that the keys are correctly formatted.
###Stripe Plans
php artisan stripe:list-plans
Displays a table of the plans currently enabled on your Stripe account.
php artisan stripe:make-plan
Interactive wizard to create a plan via the CLI.
php artisan stripe:delete-plan {id}
Deletes a plan with the supplied id. To see this ID, list the plans, and select the value from the first column.
###Stripe Coupons
php artisan stripe:list-coupons
Displays a table of the coupons currently enabled on your Stripe account.
php artisan stripe:make-coupon
Interactive wizard to create a coupon via the CLI.
php artisan stripe:delete-coupon {id}
Deletes a coupon with the supplied id. To see this ID, list the coupons, and select the value from the first column.
##Caveats
By default, the config/services.php
file has a section for Stripe setup like so:
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
In order to check for the keys being set properly, change this to:
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY', env('STRIPE_TEST_KEY')),
'secret' => env('STRIPE_SECRET', env('STRIPE_TEST_SECRET')),
],
and add the keys STRIPE_TEST_KEY
and STRIPE_TEST_SECRET
to your .env file.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email ben@travoltron.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.