infuse/billing 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

infuse/billing

最新稳定版本:2.0

Composer 安装命令:

composer require infuse/billing

包简介

Subscription membership module for Infuse Framework powered by Stripe

README 文档

README

Build Status Coverage Status Latest Stable Version Total Downloads

Subscription membership module for Infuse Framework powered by Stripe

Installation

  1. Install the package with composer:

     composer require infuse/billing
    
  2. Add a billing section in your app's configuration:

    '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
    ]
  3. Add the console command to run jobs to console.commands in your app's configuration:

    'console' => [
    	// ...
    	'commands' => [
    		// ...
    		'Infuse\Billing\Console\ExtendTrialCommand',
    		'Infuse\Billing\Console\SyncStripeSubscriptionsCommand',
    		'Infuse\Billing\Console\SyncStripeProfilesCommand'
    	]
    ]
  4. Add the migration to your app's configuration:

    'modules' => [
       'migrations' => [
          // ...
          'Billing'
       ],
       'migrationPaths' => [
          // ...
          'Billing' => 'vendor/infuse/billing/src/migrations'
       ]
    ]
  5. (optional) Add the following scheduled job to your app's configuration:

    'cron' => [
    	// ...
    	[
    	    'id' => 'billing:sendTrialReminders',
    	    'class' => 'Infuse\Billing\Jobs\SendTrialReminders',
    	    'minute' => 0,
    	    'expires' => 1800 // 30 minutes
    	]
    ]
  6. (optional) Add an endpoint to your routing table to receive Stripe webhooks:

    'routes' => [
    	// ...
    	'POST /billing/webhook' => [
    		'Infuse\Billing\Libs\StripeWebhook',
    		'webhook'
        ]
    ]

统计信息

  • 总下载量: 2.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-03