PHP Billing Library
Billing library providing:
-
customers with subscriptions
-
orders with actions
-
tariff plans with prices
-
smart discounts with formulas
-
bills with charges
-
calculator and aggregator
-
one-time, metered and recurring charging
Please see additional doccumentation in russian.
The preferred way to install this library is through composer.
Either run
php composer.phar require "hiqdev/php-billing"
or add
"hiqdev/php-billing": "*"
to the require section of your composer.json.
In general the billing functions like this:
For a given order a calculator finds plans and then matches applicable prices to actions and calculates charges. Then charges can be aggregated to bills with aggregator.
Billing operates such ideas:
- Action - customer's action of a type to a target
- Order - collection of actions
- Charge
- Bill
- Plan
- Price
- Customer
- Sale - binds customer to target and plan
- Target - object being charged in billing
- Type
- Calculator
- Aggregator
This project is released under the terms of the BSD-3-Clause license. Read more here.
Copyright © 2017-2018, HiQDev (http://hiqdev.com/)