Answer the question
In order to leave comments, you need to log in
How to organize billing on the site?
Good day.
There is a site providing a service that was used locally. The site is written in yii.
Now we want to provide services with the help of this site on a paid basis (roughly speaking - unrolling ads, banners, etc.) and the question arises of how to "correctly" make billing.
Actually the process itself for what and how to shoot is understandable. The theory of billing is not clear, for example:
- How to store the amount of money on the account? Separate number or each time to recalculate income and expenses?
- How to store income, expenses of the client?
- How often to "update" the billing amount? There will be a huge number of small transactions, conditionally 1000 pieces per second for $0.0000000001.
I ask for pure theory. And a huge request not to poke into ready-made solutions like openX.
Answer the question
In order to leave comments, you need to log in
I keep history and versions of everything.
I.e:
id | name | surname | email |
&etc(различные другие поля) |
plan_id(или planPrice) |
budget(до последней оплаты) | totalBudget(за все время)
id | client_id| date |
&etc(различные другие поля) |
revision(если в процессе стоимость или условия услуги поменялись) |
price |
pay (оплачено или нет, 0 или дата платежа)
id | client_id| date |
&etc(различные другие поля) |
summ (какая сумма)|
refund (внесено или нет, 0 или дата платежа) |
type (метод оплаты, Paypal, наличность, банк &etc)
id | client_id| date | date_start | date_end | archive_date_or_id |
&etc(различные другие поля) |
summ | count |
pay (выплачено или нет, 0 или дата платежа)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question