Commit Graph

24 Commits (master)

Author SHA1 Message Date
Loïc Dachary 1c165fcea3
upgrade gitea to forgejo
ci/woodpecker/pr/woodpecker Pipeline failed Details
ci/woodpecker/push/woodpecker Pipeline failed Details
Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-12-23 22:34:38 +01:00
Hostea dashboard 9b9fb8362d
fix: receipt email subject
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-09-30 18:36:56 +05:30
Hostea dashboard 9d2a53f2e2
fix: more email project renaming 2022-09-13 19:57:26 +05:30
Hostea dashboard 9f5032bd28
feat: send subscription renewal notification emails
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-09-12 21:01:24 +05:30
Hostea dashboard 669a22a004
fix: don't send pre-payment notification email
closes: https://gitea.gna.org/Hostea/dashboard/issues/49
2022-09-12 21:01:21 +05:30
Hostea dashboard 0e0b8db940
fix: test for Gna! in emails
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-09-12 17:36:24 +05:30
Hostea dashboard ac0775e075
fix: rename to Gna! in email templates 2022-09-12 17:36:04 +05:30
Hostea dashboard 51e7ea4d5e
fix: rename Gna! in emails
ci/woodpecker/push/woodpecker Pipeline failed Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-09-12 16:36:29 +05:30
Hostea dashboard 3ebc518e1f
fix: don't send emails to VMs that were requested but not created
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
SUMMARY
    dash.models.Instance is created upon request and
    infrastructure.models.InstanceCreated when the instance is created.
    Using data from InstanceCreated to send invoices should solve this
    issue.
2022-09-12 04:05:41 +05:30
Hostea dashboard 1792713952
fix: instance_names in tests must be alphanumeric and be < 20 chars
ci/woodpecker/pr/woodpecker Pipeline failed Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
closes: https://gitea.gna.org/Hostea/dashboard/issues/57
2022-09-12 03:33:20 +05:30
Aravinth Manivannan a95158f3df
fix: Gite credentials email: fix subject and let user know instance is
ci/woodpecker/push/woodpecker Pipeline was successful Details
being provisioned

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/44
2022-07-09 10:54:45 +05:30
Aravinth Manivannan b12cc044da
fix: Invoice generation must not consider deleted VMs' names for
ci/woodpecker/push/woodpecker Pipeline was successful Details
checking if payment is already fulfilled

DESCRIPTION
    Invoice generation is dependent on instance_name. Deleting a VM
    doesn't delete the corresponding payments record since payment
    receipts should be preserved for accounting purposes.

    But being heavily dependent on instance_name, without taking deleted
    VMs into account produces incorrect behavior under certain
    circumstances: if a VM named 'foo' is paid for and is deleted before
    its billing cycle is competed and a new VM is created with the same
    name, either by the same user or a different user, invoice won't be
    generated for the new VM since a payment record already exists for
    that billing cycle for the VM named 'foo'.

    Marking deleted VMs' payment records unsuitable for checking if a VM
    is already paid for will result in correct behavior.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/38
2022-07-08 22:28:39 +05:30
Aravinth Manivannan bebf18946a
fix: re-enable billing app tests
ci/woodpecker/push/woodpecker Pipeline was successful Details
Commented out for debugging, forgot to enable(!!)
2022-07-08 19:31:06 +05:30
Aravinth Manivannan 2c8a5909cb
fix: generate absolute URI when attaching links in invoice and payment
ci/woodpecker/push/woodpecker Pipeline was successful Details
notification

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/37
2022-07-08 18:51:04 +05:30
Aravinth Manivannan 2ee54a71e3
feat: management command to periodically generate invoices
ci/woodpecker/push/woodpecker Pipeline was successful Details
SUMMARY
    `python manage.py generate_invoice` generates invoices for VMs when
    it enters a new billing cycle and sends a notification email to
    VM owners.

    This command should be run as frequently as desirable. Running daily
    is recommended.

BILLING CYCLE
    By default, a billing cycle is 30 days.
2022-07-08 01:46:17 +05:30
Aravinth Manivannan 438e34f7d6
chore: refactor invoice generation into a util fn 2022-07-08 00:51:11 +05:30
Aravinth Manivannan 9c239ad78b
feat: send invoice generated notification email and payments receipt mail
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-07-07 20:51:33 +05:30
Loïc Dachary ed0186912d
s/ammount/amount/
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-07-03 15:01:09 +02:00
Aravinth Manivannan 8fc20d16be
feat: ues separate fleet repo for each unit test 2022-07-01 19:54:15 +05:30
Aravinth Manivannan 8be1e02a21
feat: load footer ctx in all templates
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-06-30 14:37:49 +05:30
Aravinth Manivannan 5ec87c83ec
feat: redirect user after successful payments for VM creation 2022-06-29 00:22:49 +05:30
Aravinth Manivannan ec49caa973
feat: payment status checking util 2022-06-25 16:27:43 +05:30
Aravinth Manivannan e688528fa3
fix: check payment status on instance level, used to be user level 2022-06-25 16:27:26 +05:30
Aravinth Manivannan d470033429
feat: implement billing with stripe
SUMMARY
    PAYMENT WORKFLOW
	1. User is redirected after a new instance is created into a view
	   that generates invoice. There are checks in place to ensure
	   invoices are not generated twice for the same VM. There is also a
	   check in place to generate invoices for time periods that are
	   already paid for
	2. User is redirected to payment form
	3. Stripe takes over
	4. If payment is successful, user is redirected to success page
	5. If payment failed, user is redirected to failure page

    PENDING INVOICES
	The user can see pending invoices on their dashboard

    PAYMENT RECEIPTS
	The user can see payment receipts on their dashboard
2022-06-22 00:37:03 +05:30