script to associate domains to recurring bills
We need to automate billing. We'll not be able to handle it manually anymore.
The objective of the script is to:
- list all domains from a server (ls /data/domains)
- list all recurring bills from invoice ninja
- match the 2 (based on domain name)
- print the reminding domains (the one not associate with a bill)
- get the end date from namecheap (if possible, if not print error, and handle it by end)
- create a recurring bill
- the creation date 6 weeks before the end
- tell people they have 4 weeks to renew
- (send a reminder after 2 weeks)
- field anniversary date (real end of life domain name)
- (this way we can shutdown domains 2 weeks before the end)