library framework-billing
Stripe billing module for Infuse Framework
idealistsoft/framework-billing
Stripe billing module for Infuse Framework
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
infuse/billing
, (*1)
Subscription membership module for Infuse Framework powered by Stripe, (*2)
Installation
-
Install the package with composer:, (*3)
composer require infuse/billing
-
Add a billing section in your app's configuration:, (*4)
'billing' => [
'model' => 'App\Users\Models\User',
'emails' => [
'trial_will_end' => true,
'trial_ended' => true,
'failed_payment' => true,
'payment_receipt' => true,
'subscription_canceled' => true
],
'defaultPlan' => 'default_plan',
'trialWillEndReminderDays' => 3
]
-
Add the console command to run jobs to console.commands
in your app's configuration:, (*5)
'console' => [
// ...
'commands' => [
// ...
'Infuse\Billing\Console\ExtendTrialCommand',
'Infuse\Billing\Console\SyncStripeSubscriptionsCommand',
'Infuse\Billing\Console\SyncStripeProfilesCommand'
]
]
-
Add the migration to your app's configuration:, (*6)
'modules' => [
'migrations' => [
// ...
'Billing'
],
'migrationPaths' => [
// ...
'Billing' => 'vendor/infuse/billing/src/migrations'
]
]
-
(optional) Add the following scheduled job to your app's configuration:, (*7)
'cron' => [
// ...
[
'id' => 'billing:sendTrialReminders',
'class' => 'Infuse\Billing\Jobs\SendTrialReminders',
'minute' => 0,
'expires' => 1800 // 30 minutes
]
]
-
(optional) Add an endpoint to your routing table to receive Stripe webhooks:, (*8)
'routes' => [
// ...
'POST /billing/webhook' => [
'Infuse\Billing\Libs\StripeWebhook',
'webhook'
]
]
dev-master
9999999-dev
Stripe billing module for Infuse Framework
Sources
Download
MIT
The Requires
The Development Requires
framework
stripe
billing
subscriptions
infuse