asterisk2billing.org
http://forum.asterisk2billing.org/

Adding invoices & dids directly to db
http://forum.asterisk2billing.org/viewtopic.php?f=18&t=10633
Page 1 of 1

Author:  reptile [ Sat Dec 07, 2013 1:52 pm ]
Post subject:  Adding invoices & dids directly to db

Hello,


I am developing an order form for ordering a package with did number,

In big what i need to understand is in which tables in MySQL i have to add my data:
- New invoice
- New payment
- Mark invoice as paid (and adding transaction info)
- Adding did to system with monthly invoicing (this i managed)
- Logging activity?

Thanks

Author:  reptile [ Sat Dec 07, 2013 4:33 pm ]
Post subject:  Re: Adding invoices & dids directly to db

My target would be:
1. Case one:New DID purchased: create invoice, payment,log payment and create+assign user with newly purchased DID
2. Case two: Simple account refill.

As per the DB, these are the tables that i found that might be relevant, please correct me or direct me:

New payment:
cc_invoice (create new invoice here)
cc_invoice_item (new line for the new invoice here too)
cc_payments (payment data here)
cc_invoice_payment (relate the invoice to the payment - cc_logpayment)
cc_logpayment (log the payment)
cc_epayment_log (again log for payment incase its from payment gateway)

New DID to a2billing:
cc_did (add new did info here)
cc_charge (add a monthly charge for the didnumber?)
cc_did_use (not sure if anything should be added here..)

In-case of simply refill - (add new payment in tables above) + :
cc_card (add credit amount to the sum in the credit column)
cc_logrefill (incase of refill?)


The reason that i want to directly inject to the DB is that in my opinion its easier to add more payment methouds, and easier to implement did resale rather than using the current options in a2billing.


Many thanks.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/