LaravelPackages.net
Acme Inc.
Toggle sidebar
monaye/nova-cashier-subscription

A Laravel Nova resource tool.

5
1
About monaye/nova-cashier-subscription

monaye/nova-cashier-subscription is a Laravel package for a laravel nova resource tool.. It currently has 1 GitHub stars and 5 downloads on Packagist. Install it with composer require monaye/nova-cashier-subscription. Discover more Laravel packages by monaye or browse all Laravel packages to compare alternatives.

Last updated

Nova Cashier Subscription Fields

Nova Cashier Subscription package provide two fields, credit card and plans user can subscribe which can be use similar to Forge/Envoyer like subscription management for user.

Features:

  • save credit card information (Stripe)
  • change subscribe plan (Stripe)
  • display message if user is on active plan
  • display message if user is on trial
  • display message if user canceled and if user is still have trial period left
  • display message if user canceled and is user is still on grace period

Table of Contents

Screenshots

credit card and payment plan

Installation

This package can be installed via command:

composer require monaye/nova-cashier-subscription

Usage

Plan::make($planList),

CreditCard::make($intentClientSecret, $stripeKey),

Plan List Format

return [
            [
                'label' => 'Free Plan',
                'value' => self::FREE_PLAN,
            ],
            [
                'label' => 'Standard Plan',
                'value' => config('stripe.standard_plan')
            ],
            [
                'label' => 'Premium Plan',
                'value' => config('stripe.premium_plan'),
            ],
        ];

Intent Client Secret

For Intent Client Secret you can simply get with :
$user->createSetupIntent()->client_secret
Please check Laravel docs for detail

Handle request

Since every application handle little bit differently, the package doesn't come with a controller that will handle the request when user submit the creditcard update and plan update request.

You can defined the FQCN with method name in the config file like below:

[
    'handleCreditUpdate' => '\App\Http\Controllers\SubscriptionController@changeSubscription',
    'handlePlanUpdate' => '\App\Http\Controllers\SubscriptionController@updateCreditCard'
]

To publish the config file:
php artisan vendor:publish --provider="Monaye\NovaCashierSubscription\ToolServiceProvider"

License

The License is free to use for non-military use and if you are:

  1. Personal use and make less than 1 million US dollar per year
  2. Corporate/Organization make less than 1 million revenue per year

License fees :

If you make more than 1 million US dollar, license fees $100/year. If you corporate/organization make more than 1 million revenue per year, license fees $150/year.

Use of license fee

All the revenue generate from this software will be donate back to following:

  1. To open source community (50%)
  2. To organization that support education for children (25%)
  3. To organization that fight for the Global Warming (25%)

More Screenshots

grace-period-message registred credit card active message

Comments