maksuco / bizplan
Manage plans and payments
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel
Requires
- jenssegers/date: ^3.2
- stripe/stripe-php: ^6.16
This package is not auto-updated.
Last update: 2020-06-25 16:37:06 UTC
README
Private package to handle Accounts plans with stripe and payu payments for Business and not users in Laravel, requires many configurations, dont use
Installation
You can install the package via composer:
composer require maksuco/BizPlan
This Package works with auto discovery in Laravel +5.5, but is compatible with older versions
Migrations
php artisan migrate
Publish plan files and laravel-mail components
php artisan vendor:publish
PayU Config (Optional)
'payu' => [ 'apiKey' => 'apiKey', 'apiLogin' => 'apiLogin', 'merchantId' => 'merchantId', 'accountId' => 'accountId', 'responseUrl' => '/thanks', 'confirmationUrl' => '/api/payupayment', 'test' => 0, //1 for true ],
Usage
Routes
//BizPlan SAMPLES //Route::get('order', 'SomeController@order'); //Route::post('order', 'SomeController@order_post'); //Route::get('confirmation', 'SomeController@confirmation'); //Route::get('payu-button', '\Maksuco\BizPlan\Http\Controllers\PayUController@payu_button_redirect');
Checkout Process Accounts
From Blade or controller
BizPlan::plan_checkout_post($biz_id,$total); app('\Maksuco\BizPlan\Http\Controllers\BizPlanController')->plan_checkout_post($biz_id,$total);
From routes
Route::post('checkout', '\Maksuco\BizPlan\Http\Controllers\BizPlanController@plan_checkout_post');
Cancel Plan
Change Plan (Downgrade,Upgrade)
BizPlan::change_plan(); app('\Maksuco\BizPlan\Http\Controllers\BizPlanController')->change_plan($biz_id,$new_plan_id);
Suspend Plan
Add days to Plan
Cancel Plan
BizPlan::cancel($biz_id);
Delete Biz
BizPlan::delete_biz($biz_id);
CRON
Suspend Accounts
Use cron to shedule a suspended accounts each day
php artisan bizplan:process
Views
By default the package publishes views/bizplan a few views for emails and order pages, you can modify this pages