Giter Club home page Giter Club logo

subscriptionbundle's Introduction

SubscriptionBundle Build Status Code Coverage Scrutinizer Code Quality

SubscriptionBundleLogo

SubscriptionBundle helps you to create and manage subscriptions services (also known as plans) for your users in your application.

The SubscriptionBundle fits perfectly in your Symfony application and your models. It don't cares about what persistence layer are you using (a http://www.doctrine-orm.org, http://www.redis.io...); it only provides an easy and solid base where start to handle this type of products in your Symfony applications.

Features

  • Trying to maintain a easy, solid, well-documented and agnostic base to start to work without headaches.
  • Many actions allowed on to subscriptions: active, expire, disable and renew with his appropriate events.
  • Extensible: you can extend and change the out-of-the-box features creating your own strategies that determine how a subscription should be handled to fit to your requirements.

Compatible

  • Symfony 3.3+/4+ applications with Doctrine

Documentation

Quick start

1. Download the bundle:

$ composer require terox/subscription-bundle

2. Enable the bundle in Symfony Application (only Symfony 3+):

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Terox\SubscriptionBundle\TeroxSubscriptionBundle(),
        );
    }

    // ...
}

3. Configure the bundle:

terox_subscription:
    # Where is the subscription model located in your application
    # Remember that your model must implement the interface
    subscription_class: AppBundle\Entity\Subscription # Interface: Terox\SubscriptionBundle\Model\SubscriptionInterface

    # Repository services name
    # Remember that repositories must be implement the interfaces
    subscription_repository: app.repository.subscription # Interface: Terox\SubscriptionBundle\Repository\SubscriptionRepositoryInterface
    product_repository: app.repository.product           # Interface: Terox\SubscriptionBundle\Repository\ProductRepositoryInterface

Read the complete configuration reference for more configuration options or tweaks.

License

This software is published under the MIT License

Contributing

I will be very happy if you want to contribute fixing some issue, providing new strategies or whatever you want. Thanks!

subscriptionbundle's People

Contributors

terox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

subscriptionbundle's Issues

How to renew subscription without autorenewal?

Hello,
method checkSubscriptionRenewable in SubscriptionManager throws Exception if subscription has not autorenewal. For what purpose? How to renew subscription without autorenewal? I can't use SubscriptionManager then?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.